18 #ifndef MAGICKCORE_EXCEPTION_PRIVATE_H 19 #define MAGICKCORE_EXCEPTION_PRIVATE_H 25 #if defined(__cplusplus) || defined(c_plusplus) 29 #define ThrowBinaryException(severity,tag,context) \ 31 if (image != (Image *) NULL) \ 32 (void) ThrowMagickException(&image->exception,GetMagickModule(),severity, \ 33 tag == (const char *) NULL ? "unknown" : tag,"`%s'",context); \ 34 return(MagickFalse); \ 36 #define ThrowFatalException(severity,tag) \ 44 exception=AcquireExceptionInfo(); \ 45 message=GetExceptionMessage(errno); \ 46 (void) ThrowMagickException(exception,GetMagickModule(),severity, \ 47 tag == (const char *) NULL ? "unknown" : tag,"`%s'",message); \ 48 message=DestroyString(message); \ 49 CatchException(exception); \ 50 (void) DestroyExceptionInfo(exception); \ 51 MagickCoreTerminus(); \ 52 _exit((int) (severity-FatalErrorException)+1); \ 54 #define ThrowFileException(exception,severity,tag,context) \ 59 message=GetExceptionMessage(errno); \ 60 (void) ThrowMagickException(exception,GetMagickModule(),severity, \ 61 tag == (const char *) NULL ? "unknown" : tag,"`%s': %s",context,message); \ 62 message=DestroyString(message); \ 64 #define ThrowImageException(severity,tag) \ 66 (void) ThrowMagickException(exception,GetMagickModule(),severity, \ 67 tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \ 68 return((Image *) NULL); \ 70 #define ThrowPolicyException(tag,status) \ 73 (void) ThrowMagickException(exception,GetMagickModule(),PolicyError, \ 74 "NotAuthorized","`%s'",tag); \ 77 #define ThrowReaderException(severity,tag) \ 79 (void) ThrowMagickException(exception,GetMagickModule(),severity, \ 80 tag == (const char *) NULL ? "unknown" : tag,"`%s'",image_info->filename); \ 81 if ((image) != (Image *) NULL) \ 83 (void) CloseBlob(image); \ 84 image=DestroyImageList(image); \ 86 return((Image *) NULL); \ 88 #define ThrowWriterException(severity,tag) \ 90 (void) ThrowMagickException(&image->exception,GetMagickModule(),severity, \ 91 tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \ 92 if (image_info->adjoin != MagickFalse) \ 93 while (image->previous != (Image *) NULL) \ 94 image=image->previous; \ 95 (void) CloseBlob(image); \ 96 return(MagickFalse); \ 105 #if defined(__cplusplus) || defined(c_plusplus) Definition: exception.h:102
MagickPrivate void InitializeExceptionInfo(ExceptionInfo *)
Definition: exception.c:687
MagickBooleanType
Definition: magick-type.h:215
#define MagickPrivate
Definition: method-attribute.h:99
MagickPrivate MagickBooleanType ClearExceptionInfo(ExceptionInfo *, MagickBooleanType)
Definition: exception.c:420