miho / MonacoFX

JavaFX editor node based on the powerful Monaco editor that drives VS Code
MIT License
75 stars 25 forks source link

RuntimeException "Max number of attempts reached" is not visible for end user #29

Open treimers opened 5 months ago

treimers commented 5 months ago

Hello,

we came across a problem with the RuntimeException thrown when maximal number of attempts is reached during initialization.

The exception is thrown in a separate thread during asynchronous initialization. As a result the thread will die and the exception is caught by the JVM. At the end the JVM will print a stack trace to console and terminate the thread.

This behaviour is not feasibly for a GUI application as this error will never find its way to the end user.

I would suggest to offer a new method for registering an UncaughtExceptionHandler (like Thread.UncaughtExceptionHandler). This would allow developers to use their own handler that pops up an exception dialog in their UI.

Thanks and best regards Thorsten