MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/client.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/locale_.h"
#include "MagickCore/log.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/string_.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.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 61 of file exception.c.
MagickExport ExceptionInfo * AcquireExceptionInfo | ( | void | ) |
Definition at line 115 of file exception.c.
References AcquireCriticalMemory(), InitializeExceptionInfo(), MagickTrue, and _ExceptionInfo::relinquish.
Referenced by CatchImageException(), CloneDrawInfo(), CloneImageView(), CloseMagickLog(), ExpandFilenames(), FormatImageProperty(), GetConfigureOption(), GetConstantColour(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetLogEventMask(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IsCommandOption(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), 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().
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(), and ListMagickInfo().
MagickExport ExceptionInfo * CloneExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 258 of file exception.c.
References AcquireCriticalMemory(), InheritException(), InitializeExceptionInfo(), MagickTrue, and _ExceptionInfo::relinquish.
|
static |
Definition at line 298 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 340 of file exception.c.
References FatalErrorException, FormatLocaleFile(), GetClientName(), and MagickCoreTerminus().
|
static |
Definition at line 382 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 ClearMagickException(), and DestroyExceptionInfo().
MagickExport ExceptionInfo * DestroyExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 418 of file exception.c.
References ActivateSemaphoreInfo(), ClearLinkedList(), DestroyExceptionElement(), DestroyLinkedList(), _ExceptionInfo::exceptions, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, _ExceptionInfo::relinquish, RelinquishMagickMemory(), RelinquishSemaphoreInfo(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, UndefinedException, and UnlockSemaphoreInfo().
Referenced by CatchImageException(), CloneDrawInfo(), CloseMagickLog(), DestroyImageView(), ExpandFilenames(), FormatImageProperty(), GetConfigureOption(), GetConstantColour(), GetDrawInfo(), GetImageInfo(), GetImageMagick(), GetLocaleMessage(), GetLogEventMask(), GetMagickHomeURL(), GetPathTemplate(), GetPolicyValue(), GetXMPProperty(), GlobExpression(), IsCommandOption(), IsRightsAuthorized(), LoadTypeCache(), LogComponentGenesis(), LogMagickEventList(), MagickToMime(), OpenBlob(), OptimizeLayerFrames(), PingImages(), ReadImage(), ReadImages(), RenderType(), SetImageInfo(), SetLogEventMask(), SetLogFormat(), SetLogMethod(), TranslateEvent(), WriteImage(), and WriteImages().
MagickPrivate MagickBooleanType ExceptionComponentGenesis | ( | void | ) |
Definition at line 468 of file exception.c.
References AcquireSemaphoreInfo(), exception_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickPrivate void ExceptionComponentTerminus | ( | void | ) |
Definition at line 493 of file exception.c.
References ActivateSemaphoreInfo(), exception_semaphore, LockSemaphoreInfo(), RelinquishSemaphoreInfo(), and UnlockSemaphoreInfo().
|
static |
Definition at line 571 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 525 of file exception.c.
References ConstantString(), CopyMagickString(), and MagickPathExtent.
MagickExport const char * GetLocaleExceptionMessage | ( | const ExceptionType | severity, |
const char * | tag | ||
) |
Definition at line 643 of file exception.c.
References ExceptionSeverityToTag(), FormatLocaleString(), GetLocaleMessage(), and MagickPathExtent.
Referenced by GetImageViewException(), and ThrowMagickExceptionList().
MagickExport void InheritException | ( | ExceptionInfo * | exception, |
const ExceptionInfo * | relative | ||
) |
Definition at line 687 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 CloneExceptionInfo(), CloneImageView(), and ReadImage().
MagickPrivate void InitializeExceptionInfo | ( | ExceptionInfo * | exception | ) |
Definition at line 735 of file exception.c.
References AcquireSemaphoreInfo(), _ExceptionInfo::exceptions, MagickCoreSignature, NewLinkedList(), _ExceptionInfo::semaphore, _ExceptionInfo::severity, _ExceptionInfo::signature, and UndefinedException.
Referenced by AcquireExceptionInfo(), and CloneExceptionInfo().
MagickExport void MagickError | ( | const ExceptionType | error, |
const char * | reason, | ||
const char * | description | ||
) |
Definition at line 773 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 809 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 843 of file exception.c.
References warning_handler.
Referenced by CatchException().
MagickExport ErrorHandler SetErrorHandler | ( | ErrorHandler | handler | ) |
Definition at line 873 of file exception.c.
References ActivateSemaphoreInfo(), error_handler, exception_semaphore, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
MagickExport FatalErrorHandler SetFatalErrorHandler | ( | FatalErrorHandler | handler | ) |
Definition at line 910 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 947 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 992 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 1145 of file exception.c.
References module, and ThrowMagickExceptionList().
Referenced by AcquireCacheNexusPixels(), AcquireCoderCache(), AcquireColorCache(), AcquireFxInfoPrivate(), AcquireKernelBuiltIn(), AcquireMagicList(), AcquireMatrixInfo(), AcquirePolicyCache(), AcquirePolygonTLS(), AcquireStreamPixels(), AllocFxRt(), AnimateImages(), BlobToImage(), BuildRPN(), ChannelFxImage(), CheckImageColors(), CheckPrimitiveExtent(), ChkImgNum(), CLAHEImage(), ClassifyImageColors(), CloneImage(), CloneImages(), ClonePolygonEdgesTLS(), CollectStatistics(), ComplexImages(), CompositeImage(), ConnectPixelCacheServer(), ConstrainColormapIndex(), ConvertPathToPolygon(), ConvertPrimitiveToPath(), CropImage(), CustomStreamToImage(), DeleteImages(), DisplayImages(), DistortImage(), DrawDashPolygon(), DrawPrimitive(), EvaluateImages(), ExecuteRPN(), ExpectChar(), ExportBlackQuantum(), ExportCMYKAQuantum(), ExportCMYKOQuantum(), ExportCMYKQuantum(), ExportImagePixels(), ExportIndexAlphaQuantum(), ExportIndexQuantum(), ExportMultispectralQuantum(), ExtendOperatorStack(), ExtendRPN(), ExtendUserSymbols(), ExternalDelegateCommand(), FileToBlob(), FileToImage(), ForwardFourierTransformImage(), FxEvaluateChannelExpression(), GenerateCoefficients(), GetChannelQualifier(), GetColorCompliance(), GetConfigureOptions(), GetConfigurePaths(), GetConstantColour(), GetDelegateCommand(), GetEdgeBoundingBox(), GetFunction(), GetHexColour(), GetHslFlt(), GetHslInt(), GetImageBoundingBox(), GetImageDynamicThreshold(), GetImageFeatures(), GetImageHistogram(), GetImageStatistics(), GetImageTotalInkDensity(), GetImgAttrToken(), GetIntensity(), GetMultilineTypeMetrics(), GetOperand(), GetOperator(), GetProperty(), GetThresholdMapFile(), GetToken(), GetTypeInfoByFamily(), GetVirtualPixelCacheNexus(), GetVirtualPixelStream(), HorizontalFilter(), ImageListToArray(), ImageStat(), ImagesToBlob(), ImagesToCustomStream(), ImageToBlob(), ImageToCustomStream(), ImageToFile(), ImportBlackQuantum(), ImportCMYKAQuantum(), ImportCMYKOQuantum(), ImportCMYKQuantum(), ImportImagePixels(), ImportIndexAlphaQuantum(), ImportIndexQuantum(), ImportMultispectralQuantum(), InitFx(), InterpretDelegateProperties(), InterpretImageProperties(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsCoderAuthorized(), KapurThreshold(), LiquidRescaleImage(), ListThresholdMapFile(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), MaybeXYWH(), MontageImageList(), MorphologyImage(), MorphologyPrimitive(), NewXMLTree(), OpenBlob(), OpenPixelCache(), OrderedDitherImage(), OTSUThreshold(), ParseAffineGeometry(), ParseCloseTag(), ParseGravityGeometry(), ParseInternalDoctype(), ParsePageGeometry(), ParseRegionGeometry(), PersistPixelCache(), PingBlob(), PolynomialImage(), PopVal(), ProcessTernaryOpr(), ProfileImage(), PushVal(), QuantizeImages(), QueryColorCompliance(), QueueAuthenticPixelCacheNexus(), QueueAuthenticPixelsStream(), ReadImage(), RegisterStaticModule(), RemoteDisplayCommand(), RemoveZeroDelayLayers(), RenderFreetype(), RenderMVGContent(), RenderType(), ResolveTernaryAddresses(), SetImageExtent(), SetImageProperty(), SetImageRegistry(), SetPixelCacheNexusPixels(), SetResampleFilter(), StreamImagePixels(), StringToArrayOfDoubles(), SyncAuthenticPixelsStream(), SyncImage(), ThrowException(), TraceBezier(), TraceStrokePolygon(), TranslateExpression(), ValidateColormapValue(), 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 1094 of file exception.c.
References ConcatenateMagickString(), CopyMagickString(), ErrorException, ExceptionEvent, FatalErrorException, FormatLocaleString(), GetLocaleExceptionMessage(), GetPathComponent(), LogMagickEvent(), MagickCoreSignature, MagickPathExtent, module, _ExceptionInfo::signature, TailPath, ThrowException(), and WarningException.
Referenced by ThrowMagickException().
|
static |
Definition at line 83 of file exception.c.
Referenced by MagickError(), and SetErrorHandler().
|
static |
Definition at line 95 of file exception.c.
Referenced by ExceptionComponentGenesis(), ExceptionComponentTerminus(), SetErrorHandler(), SetFatalErrorHandler(), and SetWarningHandler().
|
static |
Definition at line 86 of file exception.c.
Referenced by MagickFatalError(), and SetFatalErrorHandler().
|
static |
Definition at line 89 of file exception.c.
Referenced by MagickWarning(), and SetWarningHandler().