I made an ErrorHandling class as a subclass from RunTimeException to handle all my Errors.
I am also raising my own Errors, e.g. InvalidIDException (is a subclass from RunTimeException)
That all was working in RB 2012.

With Xojo / Cocoa the following code is not working:

if (ShID < 1) then Raise new InvalidIDException

InvalidIDException is subclassed from RunTimeException

According the Language Reference it should be possible to raise an Exception like

if True then Raise new RunTimException

but this is not working - it is compiling but it causes a RunTimeException

What I’m missing? What I’m overlooking?
Thanks for any help

Xojo 2013 R2 on Mac

Function UnhandledException(error As RuntimeException) As Boolean
if error isa invalidIDException then
msgBox “invalidIDException”
return true
end if
End Function


Sub Action()

if true then
raise new invalidIDException
end if

exception err as invalidIDException
msgBox “invalidIDException”
End Sub


Thank’s Joachim,

but Shame on me!
Under Project I had the ‘Break on Exceptions’ option selected - and of course ANY Exception causes a break of execution.