|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/client.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/hashmap.h"#include "MagickCore/locale_.h"#include "MagickCore/log.h"#include "MagickCore/magick.h"#include "MagickCore/memory_.h"#include "MagickCore/string_.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.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) |
| MagickExport ExceptionInfo * | CloneExceptionInfo (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) |
| static 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 |
| MagickExport ExceptionInfo* AcquireExceptionInfo | ( | void | ) |
Definition at line 102 of file exception.c.
References AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, GetExceptionInfo(), _ExceptionInfo::relinquish, and MagickTrue.
Referenced by OpenBlob(), GetConfigureOption(), PingImages(), ReadImage(), ReadImages(), WriteImage(), WriteImages(), CloneDrawInfo(), GetDrawInfo(), AcquireFxInfo(), CloneImageView(), NewImageView(), NewImageViewRegion(), CatchImageException(), GetImageInfo(), SetImageInfo(), OptimizeLayerFrames(), GetLocaleMessage(), CloseMagickLog(), IsEventLogging(), TranslateEvent(), LogMagickEventList(), SetLogEventMask(), SetLogFormat(), GetImageMagick(), MagickToMime(), GetPolicyValue(), IsRightsAuthorized(), FormatImageProperty(), GetXMPProperty(), GetPathTemplate(), GlobExpression(), LoadTypeList(), ExpandFilenames(), and GetMagickHomeURL().
| MagickExport void CatchException | ( | ExceptionInfo * | exception | ) |
Definition at line 201 of file exception.c.
References _ExceptionInfo::signature, MagickSignature, _ExceptionInfo::exceptions, LockSemaphoreInfo(), _ExceptionInfo::semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _ExceptionInfo::severity, WarningException, ErrorException, MagickWarning(), _ExceptionInfo::reason, _ExceptionInfo::description, FatalErrorException, MagickError(), MagickFatalError(), UnlockSemaphoreInfo(), and ClearMagickException().
Referenced by RenderPostscript(), DrawImage(), and CatchImageException().
| MagickExport void ClearMagickException | ( | ExceptionInfo * | exception | ) |
Definition at line 153 of file exception.c.
References _ExceptionInfo::signature, MagickSignature, _ExceptionInfo::exceptions, LockSemaphoreInfo(), _ExceptionInfo::semaphore, RemoveLastElementFromLinkedList(), DestroyExceptionElement(), _ExceptionInfo::severity, UndefinedException, _ExceptionInfo::reason, _ExceptionInfo::description, and UnlockSemaphoreInfo().
Referenced by CatchException(), FxEvaluateSubexpression(), ListMagickInfo(), LoadMimeLists(), and CropImageToTiles().
| MagickExport ExceptionInfo* CloneExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 251 of file exception.c.
References AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, GetExceptionInfo(), InheritException(), _ExceptionInfo::relinquish, and MagickTrue.
| static void DefaultErrorHandler | ( | const ExceptionType | , |
| const char * | , | ||
| const char * | |||
| ) | [static] |
| static void DefaultErrorHandler | ( | const ExceptionType | magick_unusedseverity, |
| const char * | reason, | ||
| const char * | description | ||
| ) | [static] |
Definition at line 293 of file exception.c.
References FormatLocaleFile(), and GetClientName().
| static void DefaultFatalErrorHandler | ( | const ExceptionType | , |
| const char * | , | ||
| const char * | |||
| ) |
| static void DefaultFatalErrorHandler | ( | const ExceptionType | magick_unusedseverity, |
| const char * | reason, | ||
| const char * | description | ||
| ) | [static] |
Definition at line 334 of file exception.c.
References FormatLocaleFile(), GetClientName(), and MagickCoreTerminus().
| static void DefaultWarningHandler | ( | const ExceptionType | , |
| const char * | , | ||
| const char * | |||
| ) |
| static void DefaultWarningHandler | ( | const ExceptionType | magick_unusedseverity, |
| const char * | reason, | ||
| const char * | description | ||
| ) | [static] |
Definition at line 377 of file exception.c.
References FormatLocaleFile(), and GetClientName().
| static void* DestroyExceptionElement | ( | void * | exception | ) | [static] |
Definition at line 139 of file exception.c.
References _ExceptionInfo::reason, DestroyString(), _ExceptionInfo::description, and RelinquishMagickMemory().
Referenced by ClearMagickException(), and DestroyExceptionInfo().
| MagickExport ExceptionInfo* DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 411 of file exception.c.
References _ExceptionInfo::signature, MagickSignature, _ExceptionInfo::semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), _ExceptionInfo::severity, UndefinedException, _ExceptionInfo::exceptions, DestroyLinkedList(), DestroyExceptionElement(), _ExceptionInfo::relinquish, MagickFalse, UnlockSemaphoreInfo(), DestroySemaphoreInfo(), and RelinquishMagickMemory().
Referenced by OpenBlob(), GetConfigureOption(), PingImages(), ReadImage(), ReadImages(), WriteImage(), WriteImages(), CloneDrawInfo(), GetDrawInfo(), DestroyFxInfo(), DestroyImageView(), CatchImageException(), GetImageInfo(), SetImageInfo(), OptimizeLayerFrames(), GetLocaleMessage(), CloseMagickLog(), IsEventLogging(), TranslateEvent(), LogMagickEventList(), SetLogEventMask(), SetLogFormat(), GetImageMagick(), MagickToMime(), GetPolicyValue(), IsRightsAuthorized(), FormatImageProperty(), GetXMPProperty(), GetPathTemplate(), GlobExpression(), LoadTypeList(), ExpandFilenames(), and GetMagickHomeURL().
| static const char* ExceptionSeverityToTag | ( | const ExceptionType | severity | ) | [static] |
Definition at line 536 of file exception.c.
References ResourceLimitWarning, TypeWarning, OptionWarning, DelegateWarning, MissingDelegateWarning, CorruptImageWarning, FileOpenWarning, BlobWarning, StreamWarning, CacheWarning, CoderWarning, FilterWarning, ModuleWarning, DrawWarning, ImageWarning, WandWarning, XServerWarning, MonitorWarning, RegistryWarning, ConfigureWarning, PolicyWarning, ResourceLimitError, TypeError, OptionError, DelegateError, MissingDelegateError, CorruptImageError, FileOpenError, BlobError, StreamError, CacheError, CoderError, FilterError, ModuleError, DrawError, ImageError, WandError, XServerError, MonitorError, RegistryError, ConfigureError, PolicyError, ResourceLimitFatalError, TypeFatalError, OptionFatalError, DelegateFatalError, MissingDelegateFatalError, CorruptImageFatalError, FileOpenFatalError, BlobFatalError, StreamFatalError, CacheFatalError, CoderFatalError, FilterFatalError, ModuleFatalError, DrawFatalError, ImageFatalError, WandFatalError, XServerFatalError, MonitorFatalError, RegistryFatalError, ConfigureFatalError, and PolicyFatalError.
Referenced by GetLocaleExceptionMessage().
| MagickExport void GetExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 457 of file exception.c.
References ResetMagickMemory(), _ExceptionInfo::severity, UndefinedException, _ExceptionInfo::exceptions, NewLinkedList(), _ExceptionInfo::semaphore, AllocateSemaphoreInfo(), _ExceptionInfo::signature, and MagickSignature.
Referenced by AcquireExceptionInfo(), and CloneExceptionInfo().
| MagickExport char* GetExceptionMessage | ( | const int | error | ) |
Definition at line 490 of file exception.c.
References MaxTextExtent, CopyMagickString(), and ConstantString().
Referenced by InitializeMagickList().
| MagickExport const char* GetLocaleExceptionMessage | ( | const ExceptionType | severity, |
| const char * | tag | ||
| ) |
Definition at line 608 of file exception.c.
References MaxTextExtent, FormatLocaleString(), ExceptionSeverityToTag(), and GetLocaleMessage().
Referenced by ThrowMagickExceptionList(), and GetImageViewException().
| MagickExport void InheritException | ( | ExceptionInfo * | exception, |
| const ExceptionInfo * | relative | ||
| ) |
Definition at line 652 of file exception.c.
References _ExceptionInfo::signature, MagickSignature, _ExceptionInfo::exceptions, LockSemaphoreInfo(), _ExceptionInfo::semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), ThrowException(), _ExceptionInfo::severity, _ExceptionInfo::reason, _ExceptionInfo::description, and UnlockSemaphoreInfo().
Referenced by CloneExceptionInfo(), and CloneImageView().
| MagickExport void MagickError | ( | const ExceptionType | error, |
| const char * | reason, | ||
| const char * | description | ||
| ) |
Definition at line 705 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 741 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 775 of file exception.c.
References warning_handler.
Referenced by CatchException().
| MagickExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
Definition at line 805 of file exception.c.
References error_handler.
| MagickExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
Definition at line 838 of file exception.c.
References fatal_error_handler.
Referenced by LoadLocaleList().
| MagickExport WarningHandler SetWarningHandler | ( | WarningHandler | handler | ) |
Definition at line 871 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 912 of file exception.c.
References _ExceptionInfo::signature, MagickSignature, GetLastValueInLinkedList(), _ExceptionInfo::exceptions, _ExceptionInfo::severity, LocaleCompare(), _ExceptionInfo::reason, _ExceptionInfo::description, MagickTrue, AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), ConstantString(), and AppendValueToLinkedList().
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, | ||
| ... | |||
| ) |
Definition at line 1032 of file exception.c.
References ThrowMagickExceptionList().
Referenced by AccelerateConvolveImage(), AnimateImages(), RenderType(), RenderFreetype(), RenderX11(), GetImageBoundingBox(), BlobToImage(), FileToBlob(), ImageToBlob(), ImageToFile(), ImagesToBlob(), OpenBlob(), PingBlob(), DiskToDiskPixelCacheClone(), PixelCacheCloneUnoptimized(), GetVirtualPixelsFromNexus(), OpenPixelCache(), QueueAuthenticPixelCacheNexus(), AcquireCacheNexusPixels(), LoadCoderList(), LoadCoderLists(), GetColorCompliance(), LoadColorList(), LoadColorLists(), QueryColorCompliance(), ConstrainColormapIndex(), GetImageDistortions(), ZLIBEncodeImage(), GetConfigureOptions(), LoadConfigureList(), LoadConfigureLists(), ReadImage(), WriteImage(), GetDelegateCommand(), InvokeDelegate(), LoadDelegateList(), DisplayImages(), RemoteDisplayCommand(), GenerateCoefficients(), DistortImage(), DrawImage(), GetImageFeatures(), ForwardFourierTransformImage(), InverseFourierTransformImage(), FxSubexpression(), FxGetSymbol(), FxEvaluateSubexpression(), ParseAffineGeometry(), ParseGravityGeometry(), ParsePageGeometry(), ParseRegionGeometry(), ClassifyImageColors(), GetImageHistogram(), IsHistogramImage(), IsPaletteImage(), SyncImage(), RemoveZeroDelayLayers(), DeleteImages(), ImageListToArray(), LoadLocaleList(), LoadLogList(), LoadLogLists(), LoadMagicList(), LoadMagicLists(), LoadMimeList(), InvokeDynamicImageFilter(), ExportImagePixels(), ImportImagePixels(), LoadPolicyList(), LoadPolicyLists(), GetImageTotalInkDensity(), ProfileImage(), QuantizeImages(), ExportBlackQuantum(), ExportCMYKQuantum(), ExportCMYKAQuantum(), ExportIndexQuantum(), ExportIndexAlphaQuantum(), ImportBlackQuantum(), ImportCMYKQuantum(), ImportCMYKAQuantum(), ImportIndexQuantum(), ImportIndexAlphaQuantum(), GetImageRegistry(), SetImageRegistry(), SetResampleFilter(), LiquidRescaleImage(), HorizontalFilter(), VerticalFilter(), GetImageDynamicThreshold(), AcquireRadonInfo(), EvaluateImages(), AcquireStreamPixels(), GetVirtualPixelStream(), QueueAuthenticPixelsStream(), StreamImagePixels(), SyncAuthenticPixelsStream(), GetThresholdMapFile(), ListThresholdMapFile(), OrderedPosterizeImage(), CropImage(), GetTypeInfoByFamily(), LoadTypeList(), SystemCommand(), ParseCloseTag(), ParseInternalDoctype(), and NewXMLTree().
| static 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 | ||
| ) | [static] |
Definition at line 981 of file exception.c.
References MaxTextExtent, _ExceptionInfo::signature, MagickSignature, GetLocaleExceptionMessage(), CopyMagickString(), ConcatenateMagickString(), LogMagickEvent(), ExceptionEvent, GetPathComponent(), TailPath, WarningException, ErrorException, FatalErrorException, FormatLocaleString(), and ThrowException().
Referenced by ThrowMagickException().
ErrorHandler error_handler = DefaultErrorHandler [static] |
Definition at line 76 of file exception.c.
Referenced by MagickError(), and SetErrorHandler().
FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler [static] |
Definition at line 79 of file exception.c.
Referenced by MagickFatalError(), and SetFatalErrorHandler().
WarningHandler warning_handler = DefaultWarningHandler [static] |
Definition at line 82 of file exception.c.
Referenced by MagickWarning(), and SetWarningHandler().