% July 1993 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
% %
% %
% %
+% C l o n e E x c e p t i o n I n f o %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% CloneExceptionInfo() clones the ExceptionInfo structure.
+%
+% The format of the CloneExceptionInfo method is:
+%
+% ExceptionInfo *CloneException(ExceptionInfo *exception)
+%
+% A description of each parameter follows:
+%
+% o exception: the exception info.
+%
+*/
+MagickExport ExceptionInfo *CloneExceptionInfo(ExceptionInfo *exception)
+{
+ ExceptionInfo
+ *clone_exception;
+
+ clone_exception=(ExceptionInfo *) AcquireMagickMemory(sizeof(*exception));
+ if (clone_exception == (ExceptionInfo *) NULL)
+ ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ GetExceptionInfo(clone_exception);
+ InheritException(clone_exception,exception);
+ exception->relinquish=MagickTrue;
+ return(exception);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ D e f a u l t E r r o r H a n d l e r %
% %
% %
*exception='\0';
#if defined(MAGICKCORE_HAVE_STRERROR_R)
-#if !defined(_GNU_SOURCE)
+#if !defined(MAGICKCORE_STRERROR_R_CHAR_P)
(void) strerror_r(error,exception,sizeof(exception));
#else
(void) CopyMagickString(exception,strerror_r(error,exception,
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% ThrowMagickException logs an exception as determined by the log configuration
-% file. If an error occurs, MagickFalse is returned otherwise MagickTrue.
+% ThrowMagickException logs an exception as determined by the log
+% configuration file. If an error occurs, MagickFalse is returned
+% otherwise MagickTrue.
%
% The format of the ThrowMagickException method is:
%
%
*/
-static MagickBooleanType ThrowMagickExceptionList(ExceptionInfo *exception,
+MagickExport MagickBooleanType ThrowMagickExceptionList(ExceptionInfo *exception,
const char *module,const char *function,const size_t line,
const ExceptionType severity,const char *tag,const char *format,
va_list operands)