Skip to content

Commit

Permalink
Improve error management
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanzimanyi committed Oct 7, 2023
1 parent 907e92a commit 96dfad9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions meos/src/general/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ meos_error(int errlevel, int errcode, char *format, ...)
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
/* Execute the error handler function */
if (_error_handler)
_error_handler(errlevel, errcode, buffer);
Expand All @@ -195,12 +196,10 @@ meos_error(int errlevel, int errcode, char *format, ...)
#else
{
fprintf (stderr, "%s\n", buffer);
va_end(args);
if (errlevel == ERROR)
exit(EXIT_FAILURE);
}
#endif /* ! MEOS */
va_end(args);
return;
}

Expand Down

0 comments on commit 96dfad9

Please sign in to comment.