Browse Source

merge with upstream

Guénaël Muller 6 years ago
parent
commit
4567eee3eb
2 changed files with 4 additions and 1 deletions
  1. 3 1
      tracim/__init__.py
  2. 1 0
      tracim/config.py

+ 3 - 1
tracim/__init__.py View File

@@ -59,11 +59,13 @@ def web(global_config, **local_settings):
59 59
     # set Hapic
60 60
     context = PyramidContext(
61 61
         configurator=configurator,
62
-        default_error_builder=ErrorSchema()
62
+        default_error_builder=ErrorSchema(),
63
+        debug=app_config.DEBUG,
63 64
     )
64 65
     hapic.set_context(context)
65 66
     context.handle_exception(NotFound, 404)
66 67
     context.handle_exception(OperationalError, 500)
68
+    context.handle_exception(Exception, 500)
67 69
     # Add controllers
68 70
     session_controller = SessionController()
69 71
     system_controller = SystemController()

+ 1 - 0
tracim/config.py View File

@@ -130,6 +130,7 @@ class CFG(object):
130 130
             '604800',
131 131
         ))
132 132
 
133
+        self.DEBUG = asbool(settings.get('debug', False))
133 134
         # TODO - G.M - 27-03-2018 - [Email] Restore email config
134 135
         ###
135 136
         # EMAIL related stuff (notification, reply)