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 math
|
||||
import traceback
|
||||
|
||||
from bottle import response, static_file, request, FormsDict
|
||||
|
||||
@ -70,6 +71,7 @@ def catch_exceptions(func):
|
||||
try:
|
||||
return func(*args,**kwargs)
|
||||
except Exception as e:
|
||||
print(traceback.format_exc())
|
||||
for etype in errors:
|
||||
if isinstance(e,etype):
|
||||
errorhandling = errors[etype](e)
|
||||
|
Loading…
Reference in New Issue
Block a user