diff options
Diffstat (limited to 'fitz/base_error.c')
-rw-r--r-- | fitz/base_error.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fitz/base_error.c b/fitz/base_error.c index 1184981c..94876d96 100644 --- a/fitz/base_error.c +++ b/fitz/base_error.c @@ -10,7 +10,10 @@ void fz_var_imp(void *var) void fz_flush_warnings(fz_context *ctx) { if (ctx->warn->count > 1) + { fprintf(stderr, "warning: ... repeated %d times ...\n", ctx->warn->count); + LOGE("warning: %s\n", ctx->warn->count); + } ctx->warn->message[0] = 0; ctx->warn->count = 0; } @@ -32,6 +35,7 @@ void fz_warn(fz_context *ctx, char *fmt, ...) { fz_flush_warnings(ctx); fprintf(stderr, "warning: %s\n", buf); + LOGE("warning: %s\n", buf); fz_strlcpy(ctx->warn->message, buf, sizeof ctx->warn->message); ctx->warn->count = 1; } @@ -45,6 +49,7 @@ static void throw(fz_error_context *ex) longjmp(ex->stack[ex->top--].buffer, 1); } else { fprintf(stderr, "uncaught exception: %s\n", ex->message); + LOGE("uncaught exception: %s\n", ex->message); exit(EXIT_FAILURE); } } @@ -75,6 +80,7 @@ void fz_throw(fz_context *ctx, char *fmt, ...) va_end(args); fprintf(stderr, "error: %s\n", ctx->error->message); + LOGE("error: %s\n", ctx->error->message); throw(ctx->error); } |