diff options
author | hj kim <backto.kim@samsung.com> | 2018-12-13 16:00:00 +0900 |
---|---|---|
committer | hj kim <backto.kim@samsung.com> | 2018-12-13 16:02:34 +0900 |
commit | d7be1a5563a6bf59a8e9074287d4f7b6a64c8329 (patch) | |
tree | 8035829c49d7a51bc3c5d6a9fb7f8e74e0a3099c /magick/error.c | |
parent | dcc5a7178e7d3faf8f345642658392777c224191 (diff) | |
download | GraphicsMagick-d7be1a5563a6bf59a8e9074287d4f7b6a64c8329.tar.gz GraphicsMagick-d7be1a5563a6bf59a8e9074287d4f7b6a64c8329.tar.bz2 GraphicsMagick-d7be1a5563a6bf59a8e9074287d4f7b6a64c8329.zip |
Imported Upstream version 1.3.31upstream/1.3.31
Change-Id: I2c7294cf2abd64840c9513bbaed3c148dc673e1c
Diffstat (limited to 'magick/error.c')
-rw-r--r-- | magick/error.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/magick/error.c b/magick/error.c index 617e69d..afb308f 100644 --- a/magick/error.c +++ b/magick/error.c @@ -1,5 +1,5 @@ /* -% Copyright (C) 2003-2015 GraphicsMagick Group +% Copyright (C) 2003-2017 GraphicsMagick Group % Copyright (C) 2002 ImageMagick Studio % Copyright 1991-1999 E. I. du Pont de Nemours and Company % @@ -888,6 +888,9 @@ MagickExport void ThrowException(ExceptionInfo *exception, % reason, optional description, source filename, function name, and line % number. If logging is enabled, the exception is also logged. % +% If the exception already contains an ErrorException (or greater) or the +% existing exception is more severe, then it is ignored. +% % The format of the ThrowLoggedException method is: % % void ThrowLoggedException(ExceptionInfo *exception, @@ -918,7 +921,27 @@ MagickExport void ThrowLoggedException(ExceptionInfo *exception, const char *module,const char *function,const unsigned long line) { assert(exception != (ExceptionInfo *) NULL); + assert(function != (const char *) NULL); assert(exception->signature == MagickSignature); + if ((exception->severity > ErrorException) || + (exception->severity > severity)) + { + if (reason) + { + if (description) + (void) LogMagickEvent(severity,module,function,line,"Ignored: %.1024s (%.1024s)", + reason,description); + else + (void) LogMagickEvent(severity,module,function,line,"Ignored: %.1024s", + reason); + } + else + { + (void) LogMagickEvent(severity,module,function,line, + "Ignored: exception contains no reason!"); + } + return; + } exception->severity=(ExceptionType) severity; MagickFreeMemory(exception->reason); if (reason) |