-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem calling error handler from BEGIN...END SEQUENCE #1673
Comments
Some comments: |
* SqlRdd updates * [Compiler] Simplified Keyword Rule (no need for separate rules for Base, Xpp, Fox). These is now a single rule for "soft" keywords. Added ThisForm keyword for FoxPro. The detection and translation is done in the TransformationFox. The implementation of the FindForm() call is inside the code that also handles Clipper arguments and PSZs inside TransformationRT. See https://www.xsharp.eu/forum/topic/5213 * [Tests] Adjust tests to work with X# 3: - Added method FindForm() for code that uses ThisForm - Cannot use .cs extension for source file - Disable an extra warning - * [Compiler tests] Added C934 for #1673 * [Compiler tests] Added C935 for #1677 * [XGui] Suppress wndproc because current code disables mouse move messages on fixed text controls * [Compiler] Fix for C935 and #1677 . The hascode is now calculated for the full filename including the path. Previously the hashcode was for the path only. --------- Co-authored-by: cpyrgas <[email protected]>
AFAIK the errorhandler is being called - only CanDefault() is FALSE during its execution and _break() thus doesn't jump to RECOVER but exits the application. My current workaround ist this:
This calls a function retrieving the actual error line (because later in the errorhandler the call stack points to the BEGIN SEQUENCE line in stead of the one which threw the error) and puts it on a stack before moving on to the real error handler. Our own stack handler reads this and makes sure that any stack in protocols which are written during error handling remains useful. We also have replaced _break() with _ErrorBlockAwareBreak everywhere in our code:
This makes the code in the called errorblock() running to its end and then jumping back to RECOVER USING. It would also still work once CanBreak() delivers a true value in the future. It's not satisfying, though, because we needed to modify all our errorhandlers because now code after a _break() call would still be executed. IMO all this could be solved if CanBreak() and _break() behave properly. |
Stefan, |
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: