MagickCore  6.8.9
exception-private.h File Reference
#include "magick/log.h"
#include "magick/magick.h"
#include "magick/string_.h"
Include dependency graph for exception-private.h:

Go to the source code of this file.

Macros

#define ThrowBinaryException(severity, tag, context)
 
#define ThrowFatalException(severity, tag)
 
#define ThrowFileException(exception, severity, tag, context)
 
#define ThrowImageException(severity, tag)
 
#define ThrowReaderException(severity, tag)
 
#define ThrowWriterException(severity, tag)
 

Functions

MagickPrivate MagickBooleanType ClearExceptionInfo (ExceptionInfo *, MagickBooleanType)
 
MagickPrivate void InitializeExceptionInfo (ExceptionInfo *)
 

Macro Definition Documentation

#define ThrowBinaryException (   severity,
  tag,
  context 
)
Value:
{ \
if (image != (Image *) NULL) \
(void) ThrowMagickException(&image->exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s'",context); \
return(MagickFalse); \
}
Definition: image.h:152
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
#define GetMagickModule()
Definition: log.h:29
Definition: magick-type.h:216

Referenced by AcquireImageColormap(), AssignImageColors(), Classify(), ClipPixelCacheNexus(), ClutImageChannel(), ColorDecisionListImage(), ColorFloodfillImage(), ContrastStretchImageChannel(), DecipherImage(), DirectToColormapImage(), DrawImage(), EncipherImage(), EqualizeImageChannel(), FloodfillPaintImage(), GammaImageChannel(), GetImageChannelDistortion(), GradientImage(), HuffmanDecodeImage(), HuffmanEncodeImage(), ImportImagePixels(), InjectImageBlob(), IsImagesEqual(), LinearStretchImage(), MaskPixelCacheNexus(), MatteFloodfillImage(), OpenPixelCache(), PackbitsEncodeImage(), PasskeyDecipherImage(), PasskeyEncipherImage(), ProfileImage(), QuantizeImage(), RaiseImage(), RandomChannelThresholdImage(), RandomThresholdImageChannel(), RemapImage(), RemapImages(), RGBTransformImage(), SegmentImage(), SetGrayscaleImage(), SetImageClipMask(), SetImageMask(), SigmoidalContrastImageChannel(), SignatureImage(), SortColormapByIntensity(), SyncAuthenticPixelCacheNexus(), ThresholdImage(), ThresholdImageChannel(), TransformRGBImage(), and WriteImage().

#define ThrowFatalException (   severity,
  tag 
)
Value:
{ \
char \
*message; \
\
*exception; \
\
exception=AcquireExceptionInfo(); \
message=GetExceptionMessage(errno); \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s'",message); \
message=DestroyString(message); \
CatchException(exception); \
(void) DestroyExceptionInfo(exception); \
_exit((int) (severity-FatalErrorException)+1); \
}
Definition: exception.h:77
MagickExport void MagickCoreTerminus(void)
Definition: magick.c:1360
MagickExport ExceptionInfo * AcquireExceptionInfo(void)
Definition: exception.c:106
MagickExport char * GetExceptionMessage(const int error)
Definition: exception.c:477
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
MagickExport void CatchException(ExceptionInfo *exception)
Definition: exception.c:196
#define GetMagickModule()
Definition: log.h:29
MagickExport char * DestroyString(char *string)
Definition: string.c:815
struct _ExceptionInfo ExceptionInfo
Definition: magick-type.h:222
MagickExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
Definition: exception.c:447

Referenced by AcquireCoderCache(), AcquireColorCache(), AcquireConfigureCache(), AcquireDelegateCache(), AcquireDistributeCacheInfo(), AcquireDrawInfo(), AcquireExceptionInfo(), AcquireFxInfo(), AcquireImage(), AcquireImageInfo(), AcquireLocaleSplayTree(), AcquireLogCache(), AcquireMagicCache(), AcquireMimeCache(), AcquirePixelCacheNexus(), AcquirePolicyCache(), AcquireQuantizeInfo(), AcquireQuantumInfo(), AcquireRandomInfo(), AcquireResampleFilter(), AcquireResizeFilter(), AcquireSignatureInfo(), AcquireStreamInfo(), AcquireString(), AcquireStringInfo(), AcquireTimerInfo(), AcquireTokenInfo(), AcquireTypeCache(), AcquireVirtualCacheView(), AcquireVirtualMemory(), AllocateSemaphoreInfo(), AllocateString(), Ascii85Initialize(), BalanceSplayTree(), BlobToStringInfo(), CloneBlobInfo(), CloneCacheView(), CloneDrawInfo(), CloneExceptionInfo(), CloneImageView(), CloneMagickPixelPacket(), CloneMontageInfo(), ClonePixelCacheRepository(), CloneQuantizeInfo(), CloneString(), ConcatenateString(), ConcatenateStringInfo(), ConstantString(), DistributePixelCacheClient(), DistributePixelCacheServer(), DrawImage(), EscapeString(), ExpandFilenames(), GetCommandOptions(), GetImageAttribute(), GetImageChannelDepth(), GetImageChannelDistortion(), GetImageChannelDistortions(), GetImageChannelFeatures(), GetImagePixelCache(), GetImageViewException(), GetLocationStatistics(), GetPathComponents(), GetThresholdMapFile(), IncrementRandomNonce(), IsMagickTreeInstantiated(), IterateOverSplayTree(), ListFiles(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), LockMagickMutex(), MorphologyPrimitive(), NewHashmap(), NewImageView(), NewImageViewRegion(), NewLinkedList(), NewSplayTree(), OptimalTau(), ParseEntities(), ParseInternalDoctype(), ParseProcessingInstructions(), RegisterMagickInfo(), ResizeMagickMemory(), ScaleSpace(), SetImageChannelDepth(), SetImageRegistry(), SetMagickInfo(), SetStringInfoLength(), SetXMLTreeAttribute(), SplaySplayTree(), StringInfoToHexString(), StringToArgv(), StringToList(), SubstituteString(), ThrowException(), TraceBezier(), and UnlockMagickMutex().

#define ThrowFileException (   exception,
  severity,
  tag,
  context 
)
Value:
{ \
char \
*message; \
\
message=GetExceptionMessage(errno); \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s': %s",context,message); \
message=DestroyString(message); \
}
MagickExport char * GetExceptionMessage(const int error)
Definition: exception.c:477
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
#define GetMagickModule()
Definition: log.h:29
MagickExport char * DestroyString(char *string)
Definition: string.c:815

Referenced by BlobToFile(), ClipImagePath(), FileToBlob(), FileToImage(), ImagesToBlob(), ImageToBlob(), ImageToFile(), InjectImageBlob(), InvokeDelegate(), OpenBlob(), ReadImage(), ReadPixelCacheIndexes(), ReadPixelCachePixels(), RenderPostscript(), WriteImage(), WritePixelCacheIndexes(), and WritePixelCachePixels().

#define ThrowImageException (   severity,
  tag 
)
Value:
{ \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \
return((Image *) NULL); \
}
Definition: image.h:152
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
#define GetMagickModule()
Definition: log.h:29

Referenced by AdaptiveBlurImageChannel(), AdaptiveSharpenImageChannel(), BlurImageChannel(), CannyEdgeImage(), ChopImage(), CloneImage(), CombineImages(), CompareImageChannels(), CompareImageLayers(), ConnectedComponentsImage(), ConstituteImage(), ConvolveImageChannel(), DeskewImage(), DespeckleImage(), EdgeImage(), EmbossImage(), FilterImageChannel(), FrameImage(), GaussianBlurImageChannel(), HoughLineImage(), MontageImageList(), MotionBlurImageChannel(), OilPaintImage(), OptimizeLayerFrames(), PreviewImage(), ResizeImage(), RotationalBlurImageChannel(), SampleImage(), ScaleImage(), SelectiveBlurImageChannel(), SharpenImageChannel(), ShaveImage(), ShearImage(), ShearRotateImage(), SimilarityMetricImage(), StatisticImageChannel(), StereoAnaglyphImage(), and WaveImage().

#define ThrowReaderException (   severity,
  tag 
)
Value:
{ \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s'",image_info->filename); \
if ((image) != (Image *) NULL) \
{ \
(void) CloseBlob(image); \
image=DestroyImageList(image); \
} \
return((Image *) NULL); \
}
Definition: image.h:152
MagickExport MagickBooleanType CloseBlob(Image *)
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
MagickExport Image * DestroyImageList(Image *images)
Definition: list.c:443
#define GetMagickModule()
Definition: log.h:29

Referenced by ReadInlineImage().

#define ThrowWriterException (   severity,
  tag 
)
Value:
{ \
(void) ThrowMagickException(&image->exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \
if (image_info->adjoin != MagickFalse) \
while (image->previous != (Image *) NULL) \
image=image->previous; \
(void) CloseBlob(image); \
return(MagickFalse); \
}
Definition: image.h:152
MagickExport MagickBooleanType CloseBlob(Image *)
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1062
#define GetMagickModule()
Definition: log.h:29
Definition: magick-type.h:216

Function Documentation