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

"Handling an exception" - "Attention" block #892

Open
dm-at-ada opened this issue Jun 1, 2023 · 0 comments
Open

"Handling an exception" - "Attention" block #892

dm-at-ada opened this issue Jun 1, 2023 · 0 comments
Labels
editorial Feedback Feedback from users about their experience

Comments

@dm-at-ada
Copy link
Contributor

The "Attention" block states that exceptions raised in declarative sections "are not caught by the handlers of that block." Based on the descriptions provided and the example code, there is no handler applied to the declarative section, so this makes sense. The handler is applied to a call in the procedure body. Had Dangerous been called in the procedure body, with the handler applied, the exception would have been caught.

Would it be more appropriate to say: exception handlers cannot be applied to anything in the declaration block (and thus, exceptions raised there would not be caught)? It seems like this might be the intent, but that's not what is stated here.

REF: Learn.ada link

@gusthoff gusthoff added editorial Feedback Feedback from users about their experience labels Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Feedback Feedback from users about their experience
Projects
None yet
Development

No branches or pull requests

2 participants