Commit 48fa632304e44d7dd94da17c3c31dbf757897147
1 parent
b52b494b
Exists in
master
and in
2 other branches
Try to fix the heisenbug with CDF and spacepy.
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
web/run.py
... | ... | @@ -137,7 +137,7 @@ PARAMETERS = { |
137 | 137 | } |
138 | 138 | |
139 | 139 | |
140 | -# ENV ######################################################################### | |
140 | +# SETUP ENVIRONMENT ########################################################### | |
141 | 141 | |
142 | 142 | environ['SPACEPY'] = CACHE_DIR |
143 | 143 | environ['CDF_LIB'] = CDF_LIB |
... | ... | @@ -153,6 +153,13 @@ else: |
153 | 153 | log.info("Starting Flask app...") |
154 | 154 | |
155 | 155 | |
156 | +def handle_error(e): | |
157 | + log.error(e) | |
158 | + return str(e) # wish we could use the default error renderer here | |
159 | + | |
160 | +app.register_error_handler(Exception, handle_error) | |
161 | + | |
162 | + | |
156 | 163 | # SETUP JINJA2 TEMPLATE ENGINE ################################################ |
157 | 164 | |
158 | 165 | def static_global(filename): | ... | ... |