-
Notifications
You must be signed in to change notification settings - Fork 736
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
Library "Catch errors in a script" terminates calling script when used in a reporter. #1941
Comments
Can anyone tell me what corner cases I am missing? I made a change that makes all the test cases work. Here is the updated project: |
Oh @KingDavid12 , Original block (from distro): Apart from discussing how the blog should be (could be another issue), I think the current behavior and this issue (the project reported) is only a question about sync-async operation. Joan |
@jguille2 Sorry about that, I misunderstood what the focus of the thread was about on my first read through. |
I'm confused... @jguille2: If @KingDavid12's modified SAFELY TRY works in all cases, shouldn't we replace the library one with that? |
@brianharvey I don't know that it will work in all existing projects, I only tried my modified one on the examples in the thread and a few projects of my own. (Beside the point: Is there an official set of tests for this kind of thing?) So we should probably run a few more test cases before just using it. |
Don't worry @KingDavid12 (I joked after being freaking without knowing why the block suddenly had a different behavior 😄 ... and I like your comments and examples in Snap! ) @brianharvey I have no criteria to comment here about SAFELY TRY modifications. I just commented to help into @dlnelson issue and to show the workaround according to current behavior. Certainly current code is more complex than @KingDavid12 ones, but I don't know exactly the aims of the lib block. |
When using "safely try . . ." in a reporter, when an error occurs, the error handler runs, but the calling script terminates. I've attached the smallest repro I could find:
ErrorHandlingTest.zip
Note that running <should report true> at top level displays a report bubble with <true>, but using it in, e.g., an if-statement fails.
Rewriting using a continuation seems to work, but isn't really a solution suitable for beginners:
The text was updated successfully, but these errors were encountered: