fornjot
fornjot copied to clipboard
Handle errors in a user-friendly way
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
Result
s. - 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.
No longer blocked. As of #763, we have support for egui now.
This is mostly realized. The CAD kernel returns Result
s, and a lot of errors are now being shown in the UI. Any further issues should be tracked in more specific issues. Closing.