Skip to content
Snippets Groups Projects
Commit 0e0fa194 authored by Jonathan Schöbel's avatar Jonathan Schöbel
Browse files

API change: error -> status for exception handling

Instead of the trivial structure SH_Error, SH_Status is used. The name
was chosen, because error/status is set independently whether an error
has occurred. Beside the error type, it also contains the associated
errno and an error message. The error message is also printed, when it
is set. Generating error messages with variadic arguments is now also
supported.
There are also macros to check for a set status.

The exception handling was removed for the *_free methods, because they
can't fail predictably during runtime.

Unfortunately the compiler reports, that inside the macro set_status
printf may be called with NULL [printf (NULL)], although, this is
explicitly debarred.
parent f86bd5cf
No related branches found
No related tags found
No related merge requests found
Showing
with 436 additions and 596 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment