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:
parent
7c0ecda8a2
commit
528c954de9
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user