forked from ScoDoc/ScoDoc
Modif handler ScoBugCatcher pour mode dev
This commit is contained in:
parent
f5442b924f
commit
0a1a847044
@ -31,6 +31,7 @@ import sqlalchemy
|
|||||||
from app.scodoc.sco_exceptions import (
|
from app.scodoc.sco_exceptions import (
|
||||||
AccessDenied,
|
AccessDenied,
|
||||||
ScoBugCatcher,
|
ScoBugCatcher,
|
||||||
|
ScoException,
|
||||||
ScoGenError,
|
ScoGenError,
|
||||||
ScoValueError,
|
ScoValueError,
|
||||||
APIInvalidParams,
|
APIInvalidParams,
|
||||||
@ -92,6 +93,9 @@ def handle_sco_bug(exc):
|
|||||||
"""Un bug, en général rare, sur lequel les dev cherchent des
|
"""Un bug, en général rare, sur lequel les dev cherchent des
|
||||||
informations pour le corriger.
|
informations pour le corriger.
|
||||||
"""
|
"""
|
||||||
|
if current_app.config["TESTING"] or current_app.config["DEBUG"]:
|
||||||
|
raise ScoException # for development servers only
|
||||||
|
else:
|
||||||
Thread(
|
Thread(
|
||||||
target=_async_dump, args=(current_app._get_current_object(), request.url)
|
target=_async_dump, args=(current_app._get_current_object(), request.url)
|
||||||
).start()
|
).start()
|
||||||
|
Loading…
Reference in New Issue
Block a user