If you have the following code in a method you will get a NilObjectException:
dim f as FolderItem
f.Delete
When using the Exception Handler with this code:
dim f as FolderItem
f.Delete
exception exc
theException = new ErrorException(exc, currentMethodName)
then you will get a file with the name of session log in the Application Support folder and information about the NilObjectException:
2024-09-27 08:29:40 An error happened:
2024-09-27 08:29:40 Class/Method: Window1.Method2
2024-09-27 08:29:40 Time: 27. Sep 2024 08:29:40 258275992
2024-09-27 08:29:40 Type of Error: NilObjectException
2024-09-27 08:29:40 Error Number: 0
2024-09-27 08:29:40 Error Message:
2024-09-27 08:29:40 --------------------------
2024-09-27 08:29:40 Stack:
2024-09-27 08:29:40
Sub Window1.Window1.Method2(Window1.Window1)
Sub Window1.Window1.Method1(Window1.Window1)
Sub Window1.Window1.Button1_Pressed(Window1.Window1, DesktopButton)
Sub Delegate.IM_Invoke(DesktopButton)
Sub AddHandler.Stub.20()
Sub DesktopApplication._CallFunctionWithExceptionHandling()
2024-09-27 08:29:40 Stack done
Available at Xojo + Alfred