Skip to content

Commit

Permalink
Fix error when reporting unhandled exceptions.
Browse files Browse the repository at this point in the history
We changed the error sinks to reset the error code rather than the
error message, but forgot to change the checking.
  • Loading branch information
ccxvii committed Nov 10, 2023
1 parent 670eae2 commit aa0a717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/fitz/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void (fz_log_error)(fz_context *ctx, const char *str)
/* coverity[+kill] */
FZ_NORETURN void (fz_vthrow)(fz_context *ctx, int code, const char *fmt, va_list ap)
{
if (ctx->error.message[0])
if (ctx->error.errcode)
{
fz_flush_warnings(ctx);
fz_warn(ctx, "UNHANDLED EXCEPTION!");
Expand Down Expand Up @@ -454,7 +454,7 @@ void fz_log_errorFL(fz_context *ctx, const char *file, int line, const char *str
/* coverity[+kill] */
FZ_NORETURN void fz_vthrowFL(fz_context *ctx, const char *file, int line, int code, const char *fmt, va_list ap)
{
if (ctx->error.message[0])
if (ctx->error.errcode)
{
fz_flush_warnings(ctx);
fz_warn(ctx, "UNHANDLED EXCEPTION!");
Expand Down

0 comments on commit aa0a717

Please sign in to comment.