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
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Keith Poole edited this page Jul 15, 2016
·
6 revisions
Error handling is performed by the functions error, waserror, nexterror and poperror
The proc structure, accessed by externup() contains an array of Label structures (errlab), which is used
to catch errors called through the error() function.
Use
This example shows how these functions are used:
Proc *up = externup(); // Get the Proc structure (must be called 'up')
if (waserror()) { // save this location as an error handler
... error handling ... // waserror returns 0 when it's called, and 1 if
// it 'returns' again via the Label
nexterror(); // optionally call the next handler in errlab
}
... code that might call error() ...
poperror(); // Remove the local handler