#include "magick/studio.h"
#include "magick/client.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/hashmap.h"
#include "magick/locale_.h"
#include "magick/log.h"
#include "magick/magick.h"
#include "magick/memory_.h"
#include "magick/semaphore.h"
#include "magick/string_.h"
#include "magick/utility.h"
Defines | |
#define | MaxExceptionList 64 |
Functions | |
static void | DefaultErrorHandler (const ExceptionType, const char *, const char *) |
static void | DefaultFatalErrorHandler (const ExceptionType, const char *, const char *) |
static void | DefaultWarningHandler (const ExceptionType, const char *, const char *) |
MagickExport ExceptionInfo * | AcquireExceptionInfo (void) |
static void * | DestroyExceptionElement (void *exception) |
MagickExport void | ClearMagickException (ExceptionInfo *exception) |
MagickExport void | CatchException (ExceptionInfo *exception) |
MagickExport ExceptionInfo * | CloneExceptionInfo (ExceptionInfo *exception) |
static void | DefaultErrorHandler (const ExceptionType magick_unused(severity), const char *reason, const char *description) |
static void | DefaultWarningHandler (const ExceptionType magick_unused(severity), const char *reason, const char *description) |
MagickPrivate MagickBooleanType | ClearExceptionInfo (ExceptionInfo *exception, MagickBooleanType relinquish) |
MagickExport ExceptionInfo * | DestroyExceptionInfo (ExceptionInfo *exception) |
MagickPrivate MagickBooleanType | ExceptionComponentGenesis (void) |
MagickPrivate void | ExceptionComponentTerminus (void) |
MagickExport char * | GetExceptionMessage (const int error) |
static const char * | ExceptionSeverityToTag (const ExceptionType severity) |
MagickExport const char * | GetLocaleExceptionMessage (const ExceptionType severity, const char *tag) |
MagickExport void | InheritException (ExceptionInfo *exception, const ExceptionInfo *relative) |
MagickPrivate void | InitializeExceptionInfo (ExceptionInfo *exception) |
MagickExport void | MagickError (const ExceptionType error, const char *reason, const char *description) |
MagickExport void | MagickFatalError (const ExceptionType error, const char *reason, const char *description) |
MagickExport void | MagickWarning (const ExceptionType warning, const char *reason, const char *description) |
MagickExport ErrorHandler | SetErrorHandler (ErrorHandler handler) |
MagickExport FatalErrorHandler | SetFatalErrorHandler (FatalErrorHandler handler) |
MagickExport WarningHandler | SetWarningHandler (WarningHandler handler) |
MagickExport MagickBooleanType | ThrowException (ExceptionInfo *exception, const ExceptionType severity, const char *reason, const char *description) |
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) |
MagickExport MagickBooleanType | ThrowMagickException (ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...) |
Variables | |
static ErrorHandler | error_handler = DefaultErrorHandler |
static FatalErrorHandler | fatal_error_handler = DefaultFatalErrorHandler |
static WarningHandler | warning_handler = DefaultWarningHandler |
static SemaphoreInfo * | exception_semaphore = (SemaphoreInfo *) NULL |
#define MaxExceptionList 64 |
Referenced by ThrowException().
MagickExport ExceptionInfo* AcquireExceptionInfo | ( | void | ) |
References AcquireMagickMemory(), InitializeExceptionInfo(), MagickTrue, _ExceptionInfo::relinquish, ResourceLimitFatalError, and ThrowFatalException.
Referenced by AcquireFxInfo(), AcquireKernelInfo(), CatchImageException(), CloneImageView(), CloseMagickLog(), DistributePixelCacheClient(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), MagickMonitor(), MagickToMime(), NewImageView(), NewImageViewRegion(), OpenBlob(), OptimizeLayerFrames(), PingImages(), PrintChannelLocations(), ReadImage(), ReadImages(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), SetLogMethod(), TranslateEvent(), WriteImage(), WriteImages(), XColorBrowserWidget(), and XFileBrowserWidget().
MagickExport void CatchException | ( | ExceptionInfo * | exception | ) |
References ClearMagickException(), _ExceptionInfo::description, ErrorException, _ExceptionInfo::exceptions, FatalErrorException, GetNextValueInLinkedList(), LockSemaphoreInfo(), MagickCoreSignature, MagickError(), MagickFatalError(), MagickWarning(), _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UnlockSemaphoreInfo(), and WarningException.
Referenced by CatchImageException(), and RenderPostscript().
MagickPrivate MagickBooleanType ClearExceptionInfo | ( | ExceptionInfo * | exception, | |
MagickBooleanType | relinquish | |||
) |
References ActivateSemaphoreInfo(), ClearLinkedList(), DestroyExceptionElement(), DestroyLinkedList(), DestroySemaphoreInfo(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, _ExceptionInfo::relinquish, _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
MagickExport void ClearMagickException | ( | ExceptionInfo * | exception | ) |
References ClearLinkedList(), _ExceptionInfo::description, DestroyExceptionElement(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickCoreSignature, _ExceptionInfo::reason, _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
Referenced by CatchException(), CropImageToTiles(), FxEvaluateSubexpression(), ListMagickInfo(), and SetExceptionInfo().
MagickExport ExceptionInfo* CloneExceptionInfo | ( | ExceptionInfo * | exception | ) |
static void DefaultErrorHandler | ( | const ExceptionType | magick_unusedseverity, | |
const char * | reason, | |||
const char * | description | |||
) | [static] |
References FormatLocaleFile(), GetClientName(), and magick_unreferenced.
static void DefaultErrorHandler | ( | const | ExceptionType, | |
const char * | , | |||
const char * | ||||
) | [static] |
static void DefaultFatalErrorHandler | ( | const ExceptionType | severity, | |
const char * | reason, | |||
const char * | description | |||
) |
References FatalErrorException, FormatLocaleFile(), GetClientName(), and MagickCoreTerminus().
static void DefaultWarningHandler | ( | const ExceptionType | magick_unusedseverity, | |
const char * | reason, | |||
const char * | description | |||
) | [static] |
References FormatLocaleFile(), GetClientName(), and magick_unreferenced.
static void DefaultWarningHandler | ( | const | ExceptionType, | |
const char * | , | |||
const char * | ||||
) |
static void* DestroyExceptionElement | ( | void * | exception | ) | [static] |
References _ExceptionInfo::description, DestroyString(), _ExceptionInfo::reason, and RelinquishMagickMemory().
Referenced by ClearExceptionInfo(), and ClearMagickException().
MagickExport ExceptionInfo* DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
References ClearExceptionInfo(), MagickFalse, and RelinquishMagickMemory().
Referenced by AcquireKernelInfo(), CatchImageException(), CloseMagickLog(), DestroyFxInfo(), DestroyImageView(), DistributePixelCacheClient(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), MagickMonitor(), MagickToMime(), OpenBlob(), OptimizeLayerFrames(), PingImages(), ReadImage(), ReadImages(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), SetLogMethod(), TranslateEvent(), WriteImage(), WriteImages(), and XFileBrowserWidget().
MagickPrivate MagickBooleanType ExceptionComponentGenesis | ( | void | ) |
References AllocateSemaphoreInfo(), exception_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickPrivate void ExceptionComponentTerminus | ( | void | ) |
static const char* ExceptionSeverityToTag | ( | const ExceptionType | severity | ) | [static] |
References BlobError, BlobFatalError, BlobWarning, CacheError, CacheFatalError, CacheWarning, CoderError, CoderFatalError, CoderWarning, ConfigureError, ConfigureFatalError, ConfigureWarning, CorruptImageError, CorruptImageFatalError, CorruptImageWarning, DelegateError, DelegateFatalError, DelegateWarning, DrawError, DrawFatalError, DrawWarning, FileOpenError, FileOpenFatalError, FileOpenWarning, FilterError, FilterFatalError, FilterWarning, ImageError, ImageFatalError, ImageWarning, MissingDelegateError, MissingDelegateFatalError, MissingDelegateWarning, ModuleError, ModuleFatalError, ModuleWarning, MonitorError, MonitorFatalError, MonitorWarning, OptionError, OptionFatalError, OptionWarning, PolicyError, PolicyFatalError, PolicyWarning, RegistryError, RegistryFatalError, RegistryWarning, ResourceLimitError, ResourceLimitFatalError, ResourceLimitWarning, StreamError, StreamFatalError, StreamWarning, TypeError, TypeFatalError, TypeWarning, WandError, WandFatalError, WandWarning, XServerError, XServerFatalError, and XServerWarning.
Referenced by GetLocaleExceptionMessage().
MagickExport char* GetExceptionMessage | ( | const int | error | ) |
References ConstantString(), CopyMagickString(), and MaxTextExtent.
MagickExport const char* GetLocaleExceptionMessage | ( | const ExceptionType | severity, | |
const char * | tag | |||
) |
References ExceptionSeverityToTag(), FormatLocaleString(), GetLocaleMessage(), and MaxTextExtent.
Referenced by GetImageViewException(), ThrowMagickExceptionList(), and XNoticeWidget().
MagickExport void InheritException | ( | ExceptionInfo * | exception, | |
const ExceptionInfo * | relative | |||
) |
References _ExceptionInfo::description, _ExceptionInfo::exceptions, GetNextValueInLinkedList(), LockSemaphoreInfo(), MagickCoreSignature, _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowException(), and UnlockSemaphoreInfo().
Referenced by AdaptiveBlurImageChannel(), AdaptiveSharpenImageChannel(), AdaptiveThresholdImage(), AddNoiseImageChannel(), AppendImages(), BlueShiftImage(), CloneExceptionInfo(), CloneImage(), CloneImageView(), ColorizeImage(), ColorMatrixImage(), CombineImages(), CompareImageChannels(), ConstituteImage(), DespeckleImage(), DistortImage(), DistortResizeImage(), DuplexTransferImageViewIterator(), EnhanceImage(), EvaluateImageChannel(), EvaluateImages(), ExtentImage(), FilterImageChannel(), FrameImage(), FunctionImageChannel(), FxImageChannel(), GetImageException(), HorizontalFilter(), ImagesToBlob(), ImageToBlob(), ImplodeImage(), InterpolativeResizeImage(), KuwaharaImageChannel(), LocalContrastImage(), MeanShiftImage(), MontageImageList(), MorphImages(), MorphologyApply(), MotionBlurImageChannel(), OilPaintImage(), OrderedPosterizeImageChannel(), PolaroidImage(), PolynomialImageChannel(), RandomThresholdImageChannel(), RotationalBlurImageChannel(), ScaleImage(), SelectiveBlurImageChannel(), SepiaToneImage(), SetImageViewIterator(), ShadeImage(), ShearImage(), ShearRotateImage(), SimilarityMetricImage(), SmushImages(), SparseColorImage(), SpliceImage(), SpreadImage(), StatisticImageChannel(), SteganoImage(), StereoAnaglyphImage(), SwirlImage(), TintImage(), TransferImageViewIterator(), UniqueImageColors(), UpdateImageViewIterator(), VerticalFilter(), VignetteImage(), and WaveImage().
MagickPrivate void InitializeExceptionInfo | ( | ExceptionInfo * | exception | ) |
MagickExport void MagickError | ( | const ExceptionType | error, | |
const char * | reason, | |||
const char * | description | |||
) |
References error_handler.
Referenced by CatchException().
MagickExport void MagickFatalError | ( | const ExceptionType | error, | |
const char * | reason, | |||
const char * | description | |||
) |
References fatal_error_handler.
Referenced by CatchException().
MagickExport void MagickWarning | ( | const ExceptionType | warning, | |
const char * | reason, | |||
const char * | description | |||
) |
References warning_handler.
Referenced by CatchException().
MagickExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
References ActivateSemaphoreInfo(), error_handler, exception_semaphore, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
MagickExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
References ActivateSemaphoreInfo(), exception_semaphore, fatal_error_handler, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by LoadLocaleCache().
MagickExport WarningHandler SetWarningHandler | ( | WarningHandler | handler | ) |
References ActivateSemaphoreInfo(), exception_semaphore, LockSemaphoreInfo(), UnlockSemaphoreInfo(), and warning_handler.
Referenced by IdentifyImage().
MagickExport MagickBooleanType ThrowException | ( | ExceptionInfo * | exception, | |
const ExceptionType | severity, | |||
const char * | reason, | |||
const char * | description | |||
) |
References AcquireMagickMemory(), AppendValueToLinkedList(), ConstantString(), _ExceptionInfo::description, ErrorException, _ExceptionInfo::exceptions, GetLastValueInLinkedList(), GetMagickModule, GetNumberOfElementsInLinkedList(), LocaleCompare(), LockSemaphoreInfo(), MagickCoreSignature, MagickTrue, MaxExceptionList, _ExceptionInfo::reason, ResourceLimitFatalError, ResourceLimitWarning, _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowFatalException, ThrowMagickException(), and UnlockSemaphoreInfo().
Referenced by InheritException(), and ThrowMagickExceptionList().
MagickExport MagickBooleanType ThrowMagickException | ( | ExceptionInfo * | exception, | |
const char * | module, | |||
const char * | function, | |||
const size_t | line, | |||
const ExceptionType | severity, | |||
const char * | tag, | |||
const char * | format, | |||
... | ||||
) |
References ThrowMagickExceptionList().
Referenced by AcquireCacheNexusPixels(), AcquireCoderCache(), AcquireColorCache(), AcquireFxThreadSet(), AcquireMagicCache(), AcquireMatrixInfo(), AcquirePolicyCache(), AcquireStreamPixels(), AnimateImages(), BlobToImage(), CheckImageColors(), CheckPrimitiveExtent(), ClassifyImageColors(), CloneImage(), CloneImages(), ComplexImages(), CompositeImageChannel(), ConnectPixelCacheServer(), ConstrainColormapIndex(), CropImage(), DeleteImages(), DisplayImages(), DistortImage(), EvaluateImages(), ExportBlackQuantum(), ExportCMYKAQuantum(), ExportCMYKOQuantum(), ExportCMYKQuantum(), ExportImagePixels(), ExportIndexAlphaQuantum(), ExportIndexQuantum(), ExternalDelegateCommand(), FileToBlob(), FileToImage(), ForwardFourierTransformImage(), FxEvaluateSubexpression(), FxGetSymbol(), FxSubexpression(), GenerateCoefficients(), GetColorCompliance(), GetConfigureBlob(), GetConfigureOptions(), GetConfigurePaths(), GetDelegateCommand(), GetEdgeBoundingBox(), GetImageBoundingBox(), GetImageChannelDistortions(), GetImageChannelFeatures(), GetImageDynamicThreshold(), GetImageHistogram(), GetImageTotalInkDensity(), GetThresholdMapFile(), GetTypeInfoByFamily(), GetVirtualPixelStream(), HorizontalFilter(), ImageListToArray(), ImagesToBlob(), ImageToBlob(), ImageToFile(), ImportBlackQuantum(), ImportCMYKAQuantum(), ImportCMYKOQuantum(), ImportCMYKQuantum(), ImportImagePixels(), ImportIndexAlphaQuantum(), ImportIndexQuantum(), InterpretDelegateProperties(), InterpretImageProperties(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsCoderAuthorized(), IsHistogramImage(), IsValidColormapIndex(), KapurThreshold(), LCMSExceptionHandler(), LiquidRescaleImage(), ListThresholdMapFile(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), NewXMLTree(), OpenBlob(), OpenPixelCache(), OrderedPosterizeImageChannel(), OTSUThreshold(), ParseAffineGeometry(), ParseCloseTag(), ParseGravityGeometry(), ParseInternalDoctype(), ParseLogHandlers(), ParsePageGeometry(), ParseRegionGeometry(), PersistPixelCache(), PingBlob(), PolynomialImageChannel(), ProfileImage(), QuantizeImages(), QueryMagickColorCompliance(), QueueAuthenticPixelCacheNexus(), QueueAuthenticPixelsStream(), ReadImage(), RegisterStaticModule(), RemoteDisplayCommand(), RemoveZeroDelayLayers(), RenderFreetype(), RenderMVGContent(), RenderType(), SetImageProfileInternal(), SetImageRegistry(), SetPixelCacheNexusPixels(), SetResampleFilter(), StreamImagePixels(), StringToArrayOfDoubles(), SyncAuthenticPixelsStream(), SyncImage(), ThrowException(), TraceEllipse(), VerticalFilter(), WriteImage(), and ZLIBEncodeImage().
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 | |||
) |
References ConcatenateMagickString(), CopyMagickString(), ErrorException, ExceptionEvent, FatalErrorException, FormatLocaleString(), GetLocaleExceptionMessage(), GetPathComponent(), LogMagickEvent(), MagickCoreSignature, MaxTextExtent, _ExceptionInfo::signature, TailPath, ThrowException(), and WarningException.
Referenced by ThrowMagickException().
ErrorHandler error_handler = DefaultErrorHandler [static] |
Referenced by MagickError(), and SetErrorHandler().
SemaphoreInfo* exception_semaphore = (SemaphoreInfo *) NULL [static] |
FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler [static] |
Referenced by MagickFatalError(), and SetFatalErrorHandler().
WarningHandler warning_handler = DefaultWarningHandler [static] |
Referenced by MagickWarning(), and SetWarningHandler().