Unhandled exceptions are exceptions that were thrown outside of Try / Catch blocks. Such exceptions cause the process to exit in all cases except of server applications. Starting from B4J v5.0 it is possible to catch such exceptions. This is done with the Application_Error sub (in the Main module): Code: 'Return true to allow the default exceptions handler to handle the uncaught exception.Sub Application_Error (Error As Exception, StackTrace As String) As Boolean Return TrueEnd Sub Returning True from this sub means that the default behavior will be applied so the process will be killed. Returning False means that the exception is handled. Example: Code: Sub Process_Globals Private fx As JFX Private MainForm As FormEnd SubSub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.ShowEnd SubSub MainForm_MouseClicked (EventData As MouseEvent) Dim i As Int = "no number here..." 'this will raise an exception.End SubSub Application_Error (Error As Exception, StackTrace As String) As Boolean LogError(StackTrace) Return FalseEnd Sub Note that Application_Error is only called in Release mode. For server applications the recommended implementation is: Code: Sub Application_Error (Error As Exception, StackTrace As String) As Boolean If srvr.CurrentThreadIndex = 0 Then 'main thread LogError(StackTrace) Return False Else 'handlers threads Return True End IfEnd Sub With this code errors raised from the main thread are printed and handled while servlet and WebSocket handlers errors are passed and are caught inside the server library. Without this code, unhandled main thread exceptions cause the main thread to exit which can eventually break the server.