You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
before BEGIN SEQUENCE .F.
in BEGIN SEQUENCE .T.
in RECOVER .F.
after END SEQUENCE .F.
so the ErrorHandler() function is not called at all, as it does in VO:
before BEGIN SEQUENCE .F.
in BEGIN SEQUENCE .T.
in ErrorHandler .T. // why is this line missing in X#?
in RECOVER .F.
after END SEQUENCE .F.
FUNCTION Start() AS INT
LOCAL oCB AS CODEBLOCK
LOCAL err AS USUAL
oCB := ErrorBlock( {|err| ErrorHandler(err) } )
? "before BEGIN SEQUENCE", CanBreak()
BEGIN SEQUENCE
? "in BEGIN SEQUENCE", CanBreak()
Error{}:Throw()
RECOVER USING err
? "in RECOVER", CanBreak()
END SEQUENCE
ErrorBlock( oCB )
? "after END SEQUENCE", CanBreak()
RETURN 0
FUNCTION ErrorHandler(err) AS USUAL
? "in ErrorHandler", CanBreak()
_Break(err)
? "in ErrorHandler after _break", CanBreak()
RETURN NIL
The text was updated successfully, but these errors were encountered:
cpyrgas
changed the title
Problem calling error handler from EBGIND...END SEQUENCE
Problem calling error handler from BEGIN...END SEQUENCE
Jan 24, 2025
Some comments:
This should have worked as expected when the /vo17 compiler option (VO compatible BEGIN SEQUENCE .. END SEQUENCE) was enabled, but I see now that the code that gets generated is not correctly doing what it is supposed to do.
https://www.xsharp.eu/forum/topic?p=32646#p32646
Following code prints in X#:
so the ErrorHandler() function is not called at all, as it does in VO:
The text was updated successfully, but these errors were encountered: