Open kamoii opened 5 years ago
Note to self: exceptions in lifted IO still won't get caught, since they will be thrown inside the widget's individual thread:
exWidget :: Widget HTML a
exWidget = do
e <- div [ onClick ] [ text "BOOM" ]
a <- liftIO $ evaluate ((5 `P.div` 0))
text $ T.pack $ show "Done"
exWidget
This exception won't be caught in websocketApp
yet: I'll need to patch concur-core
for that to work first.
When the
step
function throws an exception, websocket handlers just exist causing the websocket to close. From the users point of view, the site suddenly not responding anymore.In such case, showing an alert message(e.g. "Error has occured. Please reload the page.") would be better.