-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Add caveat for opApply and exceptions. #1224
Conversation
|
Link to discussion: https://forum.dlang.org/post/n8ptpu$1ncu$1@digitalmars.com |
| $(P It is important to make sure that, if $(D opApply) catches any exceptions, that those | ||
| exceptions did not origin at the delegate passed to $(I opApply). Catching an exception | ||
| that escaped from the delegate would cause a condition that the user expected would terminate | ||
| the loop to not do so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "origin at" -> originate from
- The last sentence is cryptic. Possibly better: "The user would expect exceptions thrown from a
foreachbody to both terminate the loop, and propagate outside theforeachbody."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, that appears twice: "make sure that, ..., that those"
|
@Shachar if you update the wording a bit from the comments, i'll pull this. |
|
Hi @Shachar, could you amend the suggested fixes? If you do not have the time we can take over. Thanks! |
|
I'll pull now and make the changes as a fixup. |
As discussed on the forum, add explanation about exception handling inside opApply, and their interaction with exceptions thrown from within the opApply delelgate.