18#ifndef MAGICKCORE_EXCEPTION_H
19#define MAGICKCORE_EXCEPTION_H
21#include "MagickCore/semaphore.h"
23#if defined(__cplusplus) || defined(c_plusplus)
30 WarningException = 300,
31 ResourceLimitWarning = 300,
34 DelegateWarning = 315,
35 MissingDelegateWarning = 320,
36 CorruptImageWarning = 325,
37 FileOpenWarning = 330,
50 RegistryWarning = 390,
51 ConfigureWarning = 395,
54 ResourceLimitError = 400,
58 MissingDelegateError = 420,
59 CorruptImageError = 425,
76 FatalErrorException = 700,
77 ResourceLimitFatalError = 700,
79 OptionFatalError = 710,
80 DelegateFatalError = 715,
81 MissingDelegateFatalError = 720,
82 CorruptImageFatalError = 725,
83 FileOpenFatalError = 730,
85 StreamFatalError = 740,
86 CacheFatalError = 745,
87 CoderFatalError = 750,
88 FilterFatalError = 752,
89 ModuleFatalError = 755,
91 ImageFatalError = 765,
93 RandomFatalError = 775,
94 XServerFatalError = 780,
95 MonitorFatalError = 785,
96 RegistryFatalError = 790,
97 ConfigureFatalError = 795,
98 PolicyFatalError = 799
127 (*ErrorHandler)(
const ExceptionType,
const char *,
const char *);
130 (*FatalErrorHandler)(
const ExceptionType,
const char *,
const char *)
131 magick_attribute((__noreturn__));
134 (*WarningHandler)(
const ExceptionType,
const char *,
const char *);
136extern MagickExport
char
137 *GetExceptionMessage(
const int);
139extern MagickExport
const char
140 *GetLocaleExceptionMessage(
const ExceptionType,
const char *);
142extern MagickExport ErrorHandler
143 SetErrorHandler(ErrorHandler);
146 *AcquireExceptionInfo(
void),
150extern MagickExport FatalErrorHandler
151 SetFatalErrorHandler(FatalErrorHandler);
153extern MagickExport MagickBooleanType
154 ThrowException(
ExceptionInfo *,
const ExceptionType,
const char *,
156 ThrowMagickExceptionList(
ExceptionInfo *,
const char *,
const char *,
157 const size_t,
const ExceptionType,
const char *,
const char *,va_list),
158 ThrowMagickException(
ExceptionInfo *,
const char *,
const char *,
const size_t,
159 const ExceptionType,
const char *,
const char *,...)
160 magick_attribute((__format__ (__printf__,7,8)));
162extern MagickExport
void
166 MagickError(const ExceptionType,const
char *,const
char *),
167 MagickFatalError(const ExceptionType,const
char *,const
char *)
168 magick_attribute((__noreturn__)),
169 MagickWarning(const ExceptionType,const
char *,const
char *);
171extern MagickExport WarningHandler
172 SetWarningHandler(WarningHandler);
174#if defined(__cplusplus) || defined(c_plusplus)