From b200b6c973701dcc4e43539e1da620fc25aa2c29 Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 13 Dec 2012 15:20:26 +0000 Subject: [PATCH] --- MagickCore/cache-view.c | 2 +- MagickCore/exception-private.h | 2 +- MagickCore/exception.c | 8 +++----- MagickCore/exception.h | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/MagickCore/cache-view.c b/MagickCore/cache-view.c index 990c89433..e78729b9e 100644 --- a/MagickCore/cache-view.c +++ b/MagickCore/cache-view.c @@ -125,7 +125,7 @@ MagickExport CacheView *AcquireAuthenticCacheView(const Image *image) { CatchException(exception); MagickCoreTerminus(); - _exit(1); + _exit(CacheFatalError); } exception=DestroyExceptionInfo(exception); return(cache_view); diff --git a/MagickCore/exception-private.h b/MagickCore/exception-private.h index 53d4ddabe..98f64c336 100644 --- a/MagickCore/exception-private.h +++ b/MagickCore/exception-private.h @@ -49,7 +49,7 @@ extern "C" { CatchException(&exception); \ (void) DestroyExceptionInfo(&exception); \ MagickCoreTerminus(); \ - _exit(1); \ + _exit(severity); \ } #define ThrowFileException(exception,severity,tag,context) \ { \ diff --git a/MagickCore/exception.c b/MagickCore/exception.c index 209b562bc..5e7d9eac0 100644 --- a/MagickCore/exception.c +++ b/MagickCore/exception.c @@ -325,14 +325,12 @@ static void DefaultErrorHandler(const ExceptionType magick_unused(severity), % % o severity: Specifies the numeric error category. % -% o reason: Specifies the reason to display before terminating the -% program. +% o reason: Specifies the reason to display before terminating the program. % % o description: Specifies any description to the reason. % */ -static void DefaultFatalErrorHandler( - const ExceptionType magick_unused(severity), +static void DefaultFatalErrorHandler(const ExceptionType severity, const char *reason,const char *description) { if (reason == (char *) NULL) @@ -343,7 +341,7 @@ static void DefaultFatalErrorHandler( (void) FormatLocaleFile(stderr,".\n"); (void) fflush(stderr); MagickCoreTerminus(); - exit(1); + exit(severity); } /* diff --git a/MagickCore/exception.h b/MagickCore/exception.h index 422012e3f..e37738b5c 100644 --- a/MagickCore/exception.h +++ b/MagickCore/exception.h @@ -153,8 +153,8 @@ extern MagickExport FatalErrorHandler extern MagickExport MagickBooleanType ThrowException(ExceptionInfo *,const ExceptionType,const char *, const char *), - ThrowMagickExceptionList(ExceptionInfo *,const char *,const char *,const size_t, - const ExceptionType,const char *,const char *,va_list), + ThrowMagickExceptionList(ExceptionInfo *,const char *,const char *, + const size_t,const ExceptionType,const char *,const char *,va_list), ThrowMagickException(ExceptionInfo *,const char *,const char *,const size_t, const ExceptionType,const char *,const char *,...) magick_attribute((__format__ (__printf__,7,8))); -- 2.50.1