#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/string_.h"#include "magick/utility.h"
Go to the source code of this file.
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) |
| static void | DefaultErrorHandler (const ExceptionType magick_unused(severity), const char *reason, const char *description) |
| static void | DefaultFatalErrorHandler (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) |
| MagickExport ExceptionInfo * | DestroyExceptionInfo (ExceptionInfo *exception) |
| MagickExport void | GetExceptionInfo (ExceptionInfo *exception) |
| 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) |
| 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 unsigned long 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 unsigned long 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 |
| MagickExport ExceptionInfo* AcquireExceptionInfo | ( | void | ) |
Definition at line 101 of file exception.c.
References AcquireMagickMemory(), GetExceptionInfo(), MagickTrue, _ExceptionInfo::relinquish, ResourceLimitFatalError, and ThrowFatalException.
Referenced by AcquireFxInfo(), CatchImageException(), CloseMagickLog(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsEventLogging(), IsMagickConflict(), IsRightsAuthorized(), LoadTypeList(), LogMagickEventList(), MagickMonitor(), MagickToMime(), OpenBlob(), OptimizeLayerFrames(), PingImages(), ReadImage(), ReadImages(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), TranslateEvent(), WriteImage(), WriteImages(), XColorBrowserWidget(), and XFileBrowserWidget().
| MagickExport void CatchException | ( | ExceptionInfo * | exception | ) |
Definition at line 200 of file exception.c.
References ClearMagickException(), _ExceptionInfo::description, ErrorException, _ExceptionInfo::exceptions, FatalErrorException, GetNextValueInLinkedList(), LockSemaphoreInfo(), MagickError(), MagickFatalError(), MagickSignature, MagickWarning(), _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UnlockSemaphoreInfo(), and WarningException.
Referenced by CatchImageException(), DrawImage(), and RenderPostscript().
| MagickExport void ClearMagickException | ( | ExceptionInfo * | exception | ) |
Definition at line 152 of file exception.c.
References _ExceptionInfo::description, DestroyExceptionElement(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickSignature, _ExceptionInfo::reason, RemoveLastElementFromLinkedList(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
Referenced by CatchException(), FxEvaluateSubexpression(), ListMagickInfo(), LoadMimeLists(), and SetExceptionInfo().
| static void DefaultErrorHandler | ( | const ExceptionType | magick_unusedseverity, | |
| const char * | reason, | |||
| const char * | description | |||
| ) | [static] |
Definition at line 256 of file exception.c.
References GetClientName().
| static void DefaultErrorHandler | ( | const | ExceptionType, | |
| const char * | , | |||
| const char * | ||||
| ) | [static] |
| static void DefaultFatalErrorHandler | ( | const ExceptionType | magick_unusedseverity, | |
| const char * | reason, | |||
| const char * | description | |||
| ) | [static] |
Definition at line 297 of file exception.c.
References GetClientName(), and MagickCoreTerminus().
| static void DefaultFatalErrorHandler | ( | const | ExceptionType, | |
| const char * | , | |||
| const char * | ||||
| ) |
| static void DefaultWarningHandler | ( | const ExceptionType | magick_unusedseverity, | |
| const char * | reason, | |||
| const char * | description | |||
| ) | [static] |
Definition at line 340 of file exception.c.
References GetClientName().
| static void DefaultWarningHandler | ( | const | ExceptionType, | |
| const char * | , | |||
| const char * | ||||
| ) |
| static void* DestroyExceptionElement | ( | void * | exception | ) | [static] |
Definition at line 138 of file exception.c.
References _ExceptionInfo::description, DestroyString(), _ExceptionInfo::reason, and RelinquishMagickMemory().
Referenced by ClearMagickException(), and DestroyExceptionInfo().
| MagickExport ExceptionInfo* DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 374 of file exception.c.
References DestroyExceptionElement(), DestroyLinkedList(), DestroySemaphoreInfo(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickFalse, MagickSignature, _ExceptionInfo::relinquish, RelinquishMagickMemory(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
Referenced by CatchImageException(), CloseMagickLog(), DestroyFxInfo(), DestroyImage(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsEventLogging(), IsMagickConflict(), IsRightsAuthorized(), LoadTypeList(), LogMagickEventList(), MagickMonitor(), MagickToMime(), OpenBlob(), OptimizeLayerFrames(), PingImages(), ReadImage(), ReadImages(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), TranslateEvent(), WriteImage(), WriteImages(), and XFileBrowserWidget().
| static const char* ExceptionSeverityToTag | ( | const ExceptionType | severity | ) | [static] |
Definition at line 491 of file exception.c.
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, 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 void GetExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 418 of file exception.c.
References AllocateSemaphoreInfo(), _ExceptionInfo::exceptions, MagickSignature, NewLinkedList(), ResetMagickMemory(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, and UndefinedException.
Referenced by AcquireExceptionInfo(), AcquireImage(), and CloneImage().
| MagickExport char* GetExceptionMessage | ( | const int | error | ) |
Definition at line 451 of file exception.c.
References ConstantString(), CopyMagickString(), and MaxTextExtent.
Referenced by InitializeMagickList(), LockMagickMutex(), SystemCommand(), and UnlockMagickMutex().
| MagickExport const char* GetLocaleExceptionMessage | ( | const ExceptionType | severity, | |
| const char * | tag | |||
| ) |
Definition at line 560 of file exception.c.
References ExceptionSeverityToTag(), FormatMagickString(), GetLocaleMessage(), and MaxTextExtent.
Referenced by ThrowMagickExceptionList(), and XNoticeWidget().
| MagickExport void InheritException | ( | ExceptionInfo * | exception, | |
| const ExceptionInfo * | relative | |||
| ) |
Definition at line 604 of file exception.c.
References _ExceptionInfo::description, _ExceptionInfo::exceptions, GetNextValueInLinkedList(), LockSemaphoreInfo(), MagickSignature, _ExceptionInfo::reason, ResetLinkedListIterator(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, ThrowException(), and UnlockSemaphoreInfo().
Referenced by AdaptiveBlurImageChannel(), AdaptiveResizeImage(), AdaptiveSharpenImageChannel(), AdaptiveThresholdImage(), AddNoiseImageChannel(), AppendImages(), AverageImages(), BlueShiftImage(), BlurImageChannel(), CloneImage(), ColorizeImage(), CombineImages(), CompareImageChannels(), ConstituteImage(), ConvolveImageChannel(), DespeckleImage(), DistortImage(), EnhanceImage(), EvaluateImageChannel(), ExtentImage(), FrameImage(), FunctionImageChannel(), FxImageChannel(), GetImageException(), HorizontalFilter(), ImagesToBlob(), ImageToBlob(), ImplodeImage(), MedianFilterImage(), MontageImageList(), MorphImages(), MotionBlurImageChannel(), OilPaintImage(), OrderedPosterizeImageChannel(), PolaroidImage(), RadialBlurImageChannel(), RandomThresholdImageChannel(), RecolorImage(), ReduceNoiseImage(), RotateImage(), ScaleImage(), SelectiveBlurImageChannel(), SepiaToneImage(), ShadeImage(), ShearImage(), SimilarityImage(), SparseColorImage(), SpliceImage(), SpreadImage(), SteganoImage(), StereoAnaglyphImage(), SwirlImage(), TintImage(), UniqueImageColors(), VerticalFilter(), VignetteImage(), and WaveImage().
| MagickExport void MagickError | ( | const ExceptionType | error, | |
| const char * | reason, | |||
| const char * | description | |||
| ) |
Definition at line 657 of file exception.c.
References error_handler.
Referenced by CatchException().
| MagickExport void MagickFatalError | ( | const ExceptionType | error, | |
| const char * | reason, | |||
| const char * | description | |||
| ) |
Definition at line 693 of file exception.c.
References fatal_error_handler.
Referenced by CatchException().
| MagickExport void MagickWarning | ( | const ExceptionType | warning, | |
| const char * | reason, | |||
| const char * | description | |||
| ) |
Definition at line 727 of file exception.c.
References warning_handler.
Referenced by CatchException().
| MagickExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
Definition at line 757 of file exception.c.
References error_handler.
| MagickExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
Definition at line 790 of file exception.c.
References fatal_error_handler.
| MagickExport WarningHandler SetWarningHandler | ( | WarningHandler | handler | ) |
Definition at line 823 of file exception.c.
References warning_handler.
Referenced by IdentifyImage().
| MagickExport MagickBooleanType ThrowException | ( | ExceptionInfo * | exception, | |
| const ExceptionType | severity, | |||
| const char * | reason, | |||
| const char * | description | |||
| ) |
Definition at line 864 of file exception.c.
References AcquireMagickMemory(), AppendValueToLinkedList(), ConstantString(), _ExceptionInfo::description, _ExceptionInfo::exceptions, GetLastValueInLinkedList(), LocaleCompare(), MagickSignature, MagickTrue, _ExceptionInfo::reason, ResetMagickMemory(), ResourceLimitFatalError, _ExceptionInfo::severity, _ExceptionInfo::signature, and ThrowFatalException.
Referenced by InheritException(), and ThrowMagickExceptionList().
| MagickExport MagickBooleanType ThrowMagickException | ( | ExceptionInfo * | exception, | |
| const char * | module, | |||
| const char * | function, | |||
| const unsigned long | line, | |||
| const ExceptionType | severity, | |||
| const char * | tag, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Definition at line 976 of file exception.c.
References ThrowMagickExceptionList().
Referenced by AcquireCacheNexusPixels(), AcquireRadonInfo(), AcquireStreamPixels(), AnimateImages(), BlobToImage(), ClassifyImageColors(), CloneDiskToDiskPixelCache(), CloneDiskToMemoryPixelCache(), CloneMemoryToDiskPixelCache(), ConstrainColormapIndex(), CropImage(), DeleteImages(), DisplayImages(), DistortImage(), DrawImage(), ExportImagePixels(), ExportQuantumPixels(), FileToBlob(), ForwardFourierTransformImage(), FxEvaluateSubexpression(), FxGetSymbol(), FxSubexpression(), GenerateCoefficients(), GetColorInfo(), GetConfigureBlob(), GetConfigureOptions(), GetDelegateCommand(), GetImageBoundingBox(), GetImageChannelDistortions(), GetImageDynamicThreshold(), GetImageHistogram(), GetImageRegistry(), GetImageTotalInkDensity(), GetThresholdMapFile(), GetTypeInfoByFamily(), GetVirtualPixelsFromNexus(), GetVirtualPixelStream(), HorizontalFilter(), ImageListToArray(), ImagesToBlob(), ImageToBlob(), ImageToFile(), ImportImagePixels(), ImportQuantumPixels(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsHistogramImage(), IsPaletteImage(), LiquidRescaleImage(), ListThresholdMapFile(), LoadCoderList(), LoadCoderLists(), LoadColorList(), LoadColorLists(), LoadConfigureList(), LoadConfigureLists(), LoadDelegateList(), LoadLocaleList(), LoadLogList(), LoadLogLists(), LoadMagicList(), LoadMagicLists(), LoadMimeList(), LoadPolicyList(), LoadPolicyLists(), LoadTypeList(), NewXMLTree(), OpenBlob(), OpenPixelCache(), OrderedPosterizeImageChannel(), ParseAffineGeometry(), ParseCloseTag(), ParseGravityGeometry(), ParseInternalDoctype(), ParsePageGeometry(), ParseRegionGeometry(), PingBlob(), ProfileImage(), QuantizeImages(), QueryMagickColor(), QueueAuthenticNexus(), QueueAuthenticPixelsStream(), ReadImage(), RemoteDisplayCommand(), RemoveZeroDelayLayers(), RenderFreetype(), RenderType(), RenderX11(), SetImageRegistry(), SetResampleFilter(), StreamImagePixels(), SyncAuthenticPixelsStream(), SyncImage(), SystemCommand(), VerticalFilter(), WriteImage(), and ZLIBEncodeImage().
| MagickExport MagickBooleanType ThrowMagickExceptionList | ( | ExceptionInfo * | exception, | |
| const char * | module, | |||
| const char * | function, | |||
| const unsigned long | line, | |||
| const ExceptionType | severity, | |||
| const char * | tag, | |||
| const char * | format, | |||
| va_list | operands | |||
| ) |
Definition at line 933 of file exception.c.
References ConcatenateMagickString(), CopyMagickString(), ExceptionEvent, FormatMagickString(), GetLocaleExceptionMessage(), GetPathComponent(), LogMagickEvent(), MagickSignature, MaxTextExtent, _ExceptionInfo::signature, TailPath, ThrowException(), and vsnprintf.
Referenced by ThrowMagickException().
ErrorHandler error_handler = DefaultErrorHandler [static] |
Definition at line 75 of file exception.c.
Referenced by MagickError(), and SetErrorHandler().
FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler [static] |
Definition at line 78 of file exception.c.
Referenced by MagickFatalError(), and SetFatalErrorHandler().
WarningHandler warning_handler = DefaultWarningHandler [static] |
Definition at line 81 of file exception.c.
Referenced by MagickWarning(), and SetWarningHandler().
1.6.1