fix #2757 - Improved error messaging on startup time application induced import error (#2770)

Co-authored-by: Adam Hopkins <adam@amhopkins.com>
This commit is contained in:
Moshe Nahmias 2023-07-05 14:38:15 +03:00 committed by GitHub
parent f2cc83c1ba
commit f48506d620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,6 +180,10 @@ Or, a path to a directory to run as a simple HTTP server:
" Example File: project/sanic_server.py -> app\n"
" Example Module: project.sanic_server.app"
)
error_logger.error(
"\nThe error below might have caused the above one:\n"
f"{e.msg}"
)
sys.exit(1)
else:
raise e