MagickCore 6.9.12
|
#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"
Go to the source code of this file.
Macros | |
#define | MaxExceptionList 64 |
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 |
Definition at line 59 of file exception.c.
MagickExport ExceptionInfo * AcquireExceptionInfo | ( | void | ) |
Definition at line 113 of file exception.c.
References AcquireMagickMemory(), InitializeExceptionInfo(), MagickTrue, _ExceptionInfo::relinquish, ResourceLimitFatalError, and ThrowFatalException.
Referenced by AcquireFxInfo(), AcquireKernelInfo(), CatchImageException(), CloneImageView(), CloseMagickLog(), DistributePixelCacheClient(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetLogEventMask(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsCommandOption(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), MagickMonitor(), MagickToMime(), NewImageView(), NewImageViewRegion(), OpenBlob(), OptimizeLayerFrames(), PingImages(), PrintChannelLocations(), ReadImage(), ReadImages(), RenderType(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), SetLogMethod(), TranslateEvent(), WriteImage(), and WriteImages().
MagickExport void CatchException | ( | ExceptionInfo * | exception | ) |
Definition at line 203 of file exception.c.
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 | ||
) |
Definition at line 421 of file exception.c.
References ActivateSemaphoreInfo(), ClearLinkedList(), DestroyExceptionElement(), DestroyLinkedList(), DestroySemaphoreInfo(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, _ExceptionInfo::relinquish, _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
Referenced by DestroyExceptionInfo().
MagickExport void ClearMagickException | ( | ExceptionInfo * | exception | ) |
Definition at line 164 of file exception.c.
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 | ) |
Definition at line 258 of file exception.c.
References AcquireMagickMemory(), InheritException(), InitializeExceptionInfo(), MagickTrue, _ExceptionInfo::relinquish, ResourceLimitFatalError, and ThrowFatalException.
|
static |
Definition at line 300 of file exception.c.
References FormatLocaleFile(), GetClientName(), and magick_unreferenced.
|
static |
static void DefaultFatalErrorHandler | ( | const ExceptionType | severity, |
const char * | reason, | ||
const char * | description | ||
) |
Definition at line 342 of file exception.c.
References FatalErrorException, FormatLocaleFile(), GetClientName(), and MagickCoreTerminus().
|
static |
Definition at line 384 of file exception.c.
References FormatLocaleFile(), GetClientName(), and magick_unreferenced.
static void DefaultWarningHandler | ( | const | ExceptionType, |
const char * | , | ||
const char * | |||
) |
|
static |
Definition at line 150 of file exception.c.
References _ExceptionInfo::description, DestroyString(), _ExceptionInfo::reason, and RelinquishMagickMemory().
Referenced by ClearExceptionInfo(), and ClearMagickException().
MagickExport ExceptionInfo * DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 448 of file exception.c.
References ClearExceptionInfo(), MagickFalse, and RelinquishMagickMemory().
Referenced by AcquireKernelInfo(), CatchImageException(), CloseMagickLog(), DestroyFxInfo(), DestroyImageView(), DistributePixelCacheClient(), ExpandFilenames(), GetConfigureOption(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetLogEventMask(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IdentifyImage(), IsCommandOption(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), MagickMonitor(), MagickToMime(), OpenBlob(), OptimizeLayerFrames(), PingImages(), ReadImage(), ReadImages(), RenderType(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), SetLogMethod(), TranslateEvent(), WriteImage(), and WriteImages().
MagickPrivate MagickBooleanType ExceptionComponentGenesis | ( | void | ) |
Definition at line 473 of file exception.c.
References AllocateSemaphoreInfo(), exception_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickPrivate void ExceptionComponentTerminus | ( | void | ) |
Definition at line 498 of file exception.c.
References ActivateSemaphoreInfo(), DestroySemaphoreInfo(), exception_semaphore, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
|
static |
Definition at line 576 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, 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 | ) |
Definition at line 530 of file exception.c.
References ConstantString(), CopyMagickString(), and MaxTextExtent.
MagickExport const char * GetLocaleExceptionMessage | ( | const ExceptionType | severity, |
const char * | tag | ||
) |
Definition at line 648 of file exception.c.
References ExceptionSeverityToTag(), FormatLocaleString(), GetLocaleMessage(), and MaxTextExtent.
Referenced by GetImageViewException(), and ThrowMagickExceptionList().
MagickExport void InheritException | ( | ExceptionInfo * | exception, |
const ExceptionInfo * | relative | ||
) |
Definition at line 692 of file exception.c.
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 | ) |
Definition at line 740 of file exception.c.
References AllocateSemaphoreInfo(), _ExceptionInfo::exceptions, MagickCoreSignature, NewLinkedList(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, and UndefinedException.
Referenced by AcquireExceptionInfo(), AcquireImage(), CloneExceptionInfo(), and CloneImage().
MagickExport void MagickError | ( | const ExceptionType | error, |
const char * | reason, | ||
const char * | description | ||
) |
Definition at line 778 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 814 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 848 of file exception.c.
References warning_handler.
Referenced by CatchException().
MagickExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
Definition at line 878 of file exception.c.
References ActivateSemaphoreInfo(), error_handler, exception_semaphore, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
MagickExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
Definition at line 915 of file exception.c.
References ActivateSemaphoreInfo(), exception_semaphore, fatal_error_handler, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by LoadLocaleCache().
MagickExport WarningHandler SetWarningHandler | ( | WarningHandler | handler | ) |
Definition at line 952 of file exception.c.
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 | ||
) |
Definition at line 997 of file exception.c.
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, | ||
... | |||
) |
Definition at line 1149 of file exception.c.
References module, and ThrowMagickExceptionList().
Referenced by AcquireCacheNexusPixels(), AcquireCoderCache(), AcquireColorCache(), AcquireFxTLS(), AcquireMagicCache(), AcquireMatrixInfo(), AcquirePolicyCache(), AcquirePolygonEdgesTLS(), AcquirePolygonTLS(), AcquireStreamPixels(), AnimateImages(), BlobToImage(), CheckImageColors(), CheckPrimitiveExtent(), ClassifyImageColors(), CloneImage(), CloneImages(), ComplexImages(), CompositeImageChannel(), ConnectPixelCacheServer(), ConstrainColormapIndex(), ConvertPathToPolygon(), ConvertPrimitiveToPath(), CropImage(), DeleteImages(), DisplayImages(), DistortImage(), DrawDashPolygon(), DrawPrimitive(), 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(), GetMultilineTypeMetrics(), GetThresholdMapFile(), GetTypeInfoByFamily(), GetVirtualPixelStream(), HorizontalFilter(), ImageListToArray(), ImagesToBlob(), ImageToBlob(), ImageToFile(), ImportBlackQuantum(), ImportCMYKAQuantum(), ImportCMYKOQuantum(), ImportCMYKQuantum(), ImportImagePixels(), ImportIndexAlphaQuantum(), ImportIndexQuantum(), InterpretDelegateProperties(), InterpretImageProperties(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsCoderAuthorized(), IsHistogramImage(), IsValidColormapIndex(), KapurThreshold(), LiquidRescaleImage(), ListThresholdMapFile(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), MontageImageList(), NewXMLTree(), OpenBlob(), OpenPixelCache(), OrderedPosterizeImageChannel(), OTSUThreshold(), ParseAffineGeometry(), ParseCloseTag(), ParseGravityGeometry(), ParseInternalDoctype(), ParsePageGeometry(), ParseRegionGeometry(), PersistPixelCache(), PingBlob(), PolynomialImageChannel(), ProfileImage(), QuantizeImages(), QueryMagickColorCompliance(), QueueAuthenticPixelCacheNexus(), QueueAuthenticPixelsStream(), ReadImage(), RegisterStaticModule(), RemoteDisplayCommand(), RemoveZeroDelayLayers(), RenderFreetype(), RenderMVGContent(), RenderType(), SetFxSymbolValue(), SetImageExtent(), SetImageProperty(), SetImageRegistry(), SetPixelCacheNexusPixels(), SetResampleFilter(), StreamImagePixels(), StringToArrayOfDoubles(), SyncAuthenticPixelsStream(), SyncImage(), ThrowException(), TraceBezier(), TraceStrokePolygon(), ValidateXMPProfile(), VerticalFilter(), WriteImage(), XRenderImage(), 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 | ||
) |
Definition at line 1098 of file exception.c.
References ConcatenateMagickString(), CopyMagickString(), ErrorException, ExceptionEvent, FatalErrorException, FormatLocaleString(), GetLocaleExceptionMessage(), GetPathComponent(), LogMagickEvent(), MagickCoreSignature, MaxTextExtent, module, _ExceptionInfo::signature, TailPath, ThrowException(), and WarningException.
Referenced by ThrowMagickException().
|
static |
Definition at line 81 of file exception.c.
Referenced by MagickError(), and SetErrorHandler().
|
static |
Definition at line 93 of file exception.c.
Referenced by ExceptionComponentGenesis(), ExceptionComponentTerminus(), SetErrorHandler(), SetFatalErrorHandler(), and SetWarningHandler().
|
static |
Definition at line 84 of file exception.c.
Referenced by MagickFatalError(), and SetFatalErrorHandler().
|
static |
Definition at line 87 of file exception.c.
Referenced by MagickWarning(), and SetWarningHandler().