You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: