Skip to content
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

Catch errors during callbacks #11329

Merged
merged 2 commits into from Oct 11, 2023
Merged

Catch errors during callbacks #11329

merged 2 commits into from Oct 11, 2023

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented Oct 11, 2023

Allows continuing and calling later callbacks (with an error state).
Not 100% sure it is the behavior we want, but I did need that when working with save callbacks

@Simn
Copy link
Member

Simn commented Oct 11, 2023

Intuitively I'd say that IF we want to do that, the catch should be around the inner f() call. Having it around a given set of callbacks seems a bit random.

@kLabz
Copy link
Contributor Author

kLabz commented Oct 11, 2023

Do you mean List.iter (fun f -> try f() with Error.Error err -> handle_error err) (List.rev l); ?

@Simn
Copy link
Member

Simn commented Oct 11, 2023

Yes

@Simn Simn merged commit c612905 into development Oct 11, 2023
122 of 130 checks passed
@skial skial mentioned this pull request Oct 11, 2023
1 task
0b1kn00b pushed a commit to 0b1kn00b/haxe that referenced this pull request Jan 25, 2024
* catch errors during callbacks

* cleanup error wrapping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants