fornjot icon indicating copy to clipboard operation
fornjot copied to clipboard

Handle errors in a user-friendly way

Open hannobraun opened this issue 2 years ago • 1 comments

Right now, errors in the CAD model, whether legitimate errors due to user input, internal errors due to unimplemented functionality, or bugs, most likely lead to a panic. This crashes the host application which is not user-friendly:

  • The user might want to fix the error with a simple change to the model, and now has to restart the host application, instead of the model reloading automatically.
  • Unless the user starts the host application from a terminal, they might never even see the error message, just a silent crash.

Here's what I think we should do:

  • Any CAD kernel code should handle all errors correctly by returning Results.
  • At the top level, those results should be turned into friendly error messages and shown to the user in the UI.

Issue #69 is related. This is blocked on #116.

hannobraun avatar Jan 21 '22 13:01 hannobraun

No longer blocked. As of #763, we have support for egui now.

hannobraun avatar Jul 11 '22 13:07 hannobraun

This is mostly realized. The CAD kernel returns Results, and a lot of errors are now being shown in the UI. Any further issues should be tracked in more specific issues. Closing.

hannobraun avatar Nov 21 '22 11:11 hannobraun