1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added output for API-caught errors

This commit is contained in:
krateng 2022-04-22 17:14:57 +02:00
parent 7c0ecda8a2
commit 528c954de9

View File

@ -1,5 +1,6 @@
import os import os
import math import math
import traceback
from bottle import response, static_file, request, FormsDict from bottle import response, static_file, request, FormsDict
@ -70,6 +71,7 @@ def catch_exceptions(func):
try: try:
return func(*args,**kwargs) return func(*args,**kwargs)
except Exception as e: except Exception as e:
print(traceback.format_exc())
for etype in errors: for etype in errors:
if isinstance(e,etype): if isinstance(e,etype):
errorhandling = errors[etype](e) errorhandling = errors[etype](e)