Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unpropagated exception handling on zfp

46 views
Skip to first unread message

Kevin Chadwick

unread,
Nov 3, 2023, 2:57:02 PM11/3/23
to
On zfp with no exception propagation. You can use a local exception handler
to return thereby avoiding the last chance handler for this one procedure
or even exception type.

Obviously it would be better to take the time and prove an absence of
runtime errors.

However, when you do not have that time. I believe it is not risky if you
are sure the stack will be cleaned up upon return. Indeed the handler can
return or set known safe values. I assume that out of bounds writes are
caught by constraint checks before they occur? Sometimes you do not want to
reset the micro but just drop some functionality by return but would still
like to get the exception message to log.

The only issue is that I cannot see how to get to the exception messages
System.Address except via the last chance handler. zfp does not permit
exception propagation and so the Exception_Occurence cannot be used.

Is it possible with gnat 13, even if I need to enable the secondary stack,
just for this capability?

--
Regards, Kc

Kevin Chadwick

unread,
Nov 4, 2023, 6:05:05 AM11/4/23
to

>The only issue is that I cannot see how to get to the exception messages
> System.Address except via the last chance handler. zfp does not permit
> exception propagation and so the Exception_Occurence cannot be used.
>

If not, then atleast I can log the exception type and function but not the
line information when I wish to avoid micro reset.

--
Regards, Kc
0 new messages