Skip to content

Commit

Permalink
Log startup errors with a full stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
piemonkey committed Sep 22, 2023
1 parent 39fe491 commit 59fc614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from importlib import import_module
import builtins
import traceback

import flask
from rdflib.namespace import Namespace
Expand Down Expand Up @@ -30,7 +31,7 @@
module_path = 'ext.app.{}'.format(app_file)
import_module(module_path)
except Exception as e:
helpers.log(str(e))
helpers.log(''.join(traceback.format_exception(None, e, e.__traceback__)))

#######################
## Start Application ##
Expand Down

0 comments on commit 59fc614

Please sign in to comment.