MagickCore  6.9.1
exception.c File Reference
#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"
Include dependency graph for exception.c:

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 ExceptionInfoAcquireExceptionInfo (void)
 
static void * DestroyExceptionElement (void *exception)
 
MagickExport void ClearMagickException (ExceptionInfo *exception)
 
MagickExport void CatchException (ExceptionInfo *exception)
 
MagickExport ExceptionInfoCloneExceptionInfo (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 ExceptionInfoDestroyExceptionInfo (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)
 
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
 

Function Documentation

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 283 of file exception.c.

References FormatLocaleFile(), GetClientName(), and magick_unreferenced.

static void DefaultFatalErrorHandler ( const ExceptionType  severity,
const char *  reason,
const char *  description 
)
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 367 of file exception.c.

References FormatLocaleFile(), GetClientName(), and magick_unreferenced.

static void* DestroyExceptionElement ( void *  exception)
static
MagickExport char* GetExceptionMessage ( const int  error)

Definition at line 461 of file exception.c.

References ConstantString(), CopyMagickString(), and MaxTextExtent.

MagickExport const char* GetLocaleExceptionMessage ( const ExceptionType  severity,
const char *  tag 
)
MagickExport void InheritException ( ExceptionInfo exception,
const ExceptionInfo relative 
)

Definition at line 623 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(), AdaptiveSharpenImageChannel(), AdaptiveThresholdImage(), AddNoiseImageChannel(), AppendImages(), BlueShiftImage(), CloneExceptionInfo(), CloneImage(), CloneImageView(), ColorizeImage(), ColorMatrixImage(), CombineImages(), CompareImageChannels(), ConstituteImage(), DespeckleImage(), DistortImage(), DistortResizeImage(), DuplexTransferImageViewIterator(), EnhanceImage(), EvaluateImageChannel(), EvaluateImages(), FilterImageChannel(), FrameImage(), FunctionImageChannel(), FxImageChannel(), GetImageException(), HorizontalFilter(), ImagesToBlob(), ImageToBlob(), ImplodeImage(), InterpolativeResizeImage(), KuwaharaImageChannel(), 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().

MagickExport void MagickError ( const ExceptionType  error,
const char *  reason,
const char *  description 
)

Definition at line 709 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 745 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 779 of file exception.c.

References warning_handler.

Referenced by CatchException().

MagickExport ErrorHandler SetErrorHandler ( ErrorHandler  handler)

Definition at line 809 of file exception.c.

References error_handler.

MagickExport FatalErrorHandler SetFatalErrorHandler ( FatalErrorHandler  handler)

Definition at line 842 of file exception.c.

References fatal_error_handler.

Referenced by LoadLocaleCache().

MagickExport WarningHandler SetWarningHandler ( WarningHandler  handler)

Definition at line 875 of file exception.c.

References warning_handler.

Referenced by IdentifyImage().

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 1047 of file exception.c.

References ThrowMagickExceptionList().

Referenced by AcquireCacheNexusPixels(), AcquireCoderCache(), AcquireColorCache(), AcquireConfigureCache(), AcquireFxThreadSet(), AcquireLogCache(), AcquireMagicCache(), AcquireMatrixInfo(), AcquirePolicyCache(), AcquireStreamPixels(), AnimateImages(), BlobToImage(), ClassifyImageColors(), CloneImage(), ComplexImages(), CompositeImageChannel(), ConnectPixelCacheServer(), ConstrainColormapIndex(), CropImage(), DeleteImages(), DisplayImages(), DistortImage(), DrawImage(), EvaluateImages(), ExportBlackQuantum(), ExportCMYKAQuantum(), ExportCMYKOQuantum(), ExportCMYKQuantum(), ExportImagePixels(), ExportIndexAlphaQuantum(), ExportIndexQuantum(), ExternalDelegateCommand(), FileToBlob(), ForwardFourierTransformImage(), FxEvaluateSubexpression(), FxGetSymbol(), FxSubexpression(), GenerateCoefficients(), GetColorCompliance(), GetConfigureBlob(), GetConfigureOptions(), GetDelegateCommand(), GetImageBoundingBox(), GetImageChannelDistortions(), GetImageChannelFeatures(), GetImageDynamicThreshold(), GetImageHistogram(), GetImageRegistry(), GetImageTotalInkDensity(), GetThresholdMapFile(), GetTypeInfoByFamily(), GetVirtualPixelsFromNexus(), GetVirtualPixelStream(), HorizontalFilter(), ImageListToArray(), ImagesToBlob(), ImageToBlob(), ImageToFile(), ImportBlackQuantum(), ImportCMYKAQuantum(), ImportCMYKOQuantum(), ImportCMYKQuantum(), ImportImagePixels(), ImportIndexAlphaQuantum(), ImportIndexQuantum(), InterpretImageProperties(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsHistogramImage(), IsPaletteImage(), IsValidColormapIndex(), LiquidRescaleImage(), ListThresholdMapFile(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), MergeConnectedComponents(), NewXMLTree(), OpenBlob(), OpenPixelCache(), OrderedPosterizeImageChannel(), ParseAffineGeometry(), ParseCloseTag(), ParseGravityGeometry(), ParseInternalDoctype(), ParsePageGeometry(), ParseRegionGeometry(), PingBlob(), PolynomialImageChannel(), ProfileImage(), QuantizeImages(), QueryMagickColorCompliance(), QueueAuthenticPixelCacheNexus(), QueueAuthenticPixelsStream(), ReadImage(), RemoteDisplayCommand(), RemoveZeroDelayLayers(), RenderFreetype(), RenderType(), SetImageRegistry(), SetResampleFilter(), StatisticsComponentsStatistics(), StreamImagePixels(), StringToArrayOfDoubles(), SyncAuthenticPixelsStream(), SyncImage(), 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 
)

Variable Documentation

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().