datacipen commited on
Commit
06aa57a
·
verified ·
1 Parent(s): f6cc6d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -206,7 +206,12 @@ datadefault = [
206
  {"value": "L1508", "label": "L1508"},
207
  {"value": "L1509", "label": "L1509"},
208
  ]
209
- app = Dash(server=server, external_stylesheets=dmc.styles.ALL)
 
 
 
 
 
210
 
211
  app.layout = dmc.MantineProvider(
212
  [
 
206
  {"value": "L1508", "label": "L1508"},
207
  {"value": "L1509", "label": "L1509"},
208
  ]
209
+ def custom_error_handler(err):
210
+ # This function defines what we want to happen when an exception occurs
211
+ # For now, we just print the exception to the terminal with additional text
212
+ print(f"The app raised the following exception: {err}")
213
+
214
+ app = Dash(server=server, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
215
 
216
  app.layout = dmc.MantineProvider(
217
  [