General information
Title:
CATCH TO this.Something
Hello,
I implemented some methods using try/catch-errorhandling and see odd behavior : if I CATCH TO this.oException in different methods, which call each other I see a TRY/CATCH/ENDTRY-error. If I CATCH TO somevar, no error occurs. Calling each method for itself doesn't generate an error too. Is this intended behavior or is there a reason for that ?
TIA
Matthias
o = CREATEOBJ('Test')
o.CallWithError() && Error
o.CallWithOutError() && Success
o.Method1() && Success
o.Method2() && Success
DEFINE CLASS Test AS Custom
Exception = .NULL.
PROCEDURE CallWithError
TRY
this.Method1()
CATCH TO this.Exception
ENDTRY
ENDPROC
PROCEDURE CallWithoutError
TRY
this.Method2()
CATCH TO loLocalExc
ENDTRY
ENDPROC
PROCEDURE Method1
TRY
bahamas
CATCH TO this.Exception
ENDTRY
ENDPROC
PROCEDURE Method2
TRY
Hawaii
CATCH TO loLocalExc
ENDTRY
ENDPROC
ENDDEFINE
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only