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 4, 2023
1 parent 621a478 commit ebc1388
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions meos/src/general/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,19 @@ meos_error(int errlevel, int errcode, char *errmsg, ...)
vsprintf(buffer, errmsg, args);
/* Execute the error handler function */
if (_error_handler)
{
_error_handler(errlevel, errcode, buffer);
va_end(args);
}
else
#if ! MEOS
elog(errlevel, "%s", buffer);
#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 ebc1388

Please sign in to comment.