From fe6a21e1d720d53883ce03adaedaf3ff24322dff Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Thu, 14 Jun 2018 21:57:55 +0200 Subject: [PATCH] Added option for send mail if programming error --- paramecio/index.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paramecio/index.py b/paramecio/index.py index 884a69d..d1b36dd 100644 --- a/paramecio/index.py +++ b/paramecio/index.py @@ -36,6 +36,11 @@ if config.session_enabled==True: def clean_session(): after_session() """ + +error_reporting=False + +if hasattr(config, 'error_reporting'): + error_reporting=config.error_reporting def prepare_app(): @@ -62,6 +67,12 @@ def prepare_app(): set_timezone() + if error_reporting: + from paramecio.citoplasma.error_reporting import ErrorReportingPlugin + + app.install(ErrorReportingPlugin()) + + # Clean last slash