I’m surprise and I don’t think it was like that in previous Xojo version.
I have a button with the code in its Pressed event:
Dim f_Elt as FolderItem
Dim TampText as String
f_Elt = SpecialFolder.Documents
TampText = f_Elt.NativePath
MessageBox "Button1" + EndOfLine + TampText
AsubMethod
Exception TypErr
Beep
MessageBox "Button1 Err" + EndOfLine + TypErr.Message
.
In the Method AsubMethod I have the code (with an error):
Dim f_Elt as FolderItem
Dim TampText as String
f_Elt = Nil ' SpecialFolder.Documents
TampText = f_Elt.NativePath
MessageBox "AsubMethod" + EndOfLine + TampText
.
As the error is in the sub method, I would have the generic Xojo error, in a buit application I would have a crash. Instead of that the error is managed in the button event.
I read the doc and I’m not sure to understand how it is suppose to be managed.
Xojo doc exception
Exemple project: ExceptErr-SubMethod.proj