MagickCore 7.0.10
exception.h
Go to the documentation of this file.
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Wizard's Toolkit Exception Methods.
17*/
18#ifndef _WIZARDSTOOLKIT_EXCEPTION_H
19#define _WIZARDSTOOLKIT_EXCEPTION_H
20
21#include "wizard/semaphore.h"
22
23#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
27typedef enum
28{
46
47typedef enum
48{
56 AssertError = 7
58
59typedef enum
60{
85 HashError = 415,
86 MACError = 420,
94 UserError = 460,
97 LogError = 475,
99 FileError = 485,
123
124typedef struct _ExceptionInfo
126
127typedef void
128 (*ErrorHandler)(const ExceptionType,const char *,const char *);
129
130typedef void
131 (*FatalErrorHandler)(const ExceptionType,const char *,const char *);
132
133typedef void
134 (*WarningHandler)(const ExceptionType,const char *,const char *);
135
136/*
137 Exception declarations.
138*/
139extern WizardExport char
140 *GetExceptionMessage(const int);
141
142extern WizardExport const char
144 *GetLocaleMessage(const char *);
145
148
152
155
158
162 const char *),
163 ThrowWizardException(ExceptionInfo *,const char *,const char *,
164 const size_t,const ExceptionType,const char *,...)
165 wizard_attribute((__format__ (__printf__,6,7)));
166
167extern WizardExport void
173 WizardError(const ExceptionType,const char *,const char *),
174 WizardFatalError(const ExceptionType,const char *,const char *),
175 WizardWarning(const ExceptionType,const char *,const char *);
176
179
180#if defined(__cplusplus) || defined(c_plusplus)
181}
182#endif
183
184#endif
DomainType
Definition exception.h:28
@ RepairDomain
Definition exception.h:32
@ LogDomain
Definition exception.h:41
@ CacheDomain
Definition exception.h:40
@ UserDomain
Definition exception.h:39
@ AuthenticateDomain
Definition exception.h:36
@ HashDomain
Definition exception.h:30
@ MiscellaneousDomain
Definition exception.h:44
@ RandomDomain
Definition exception.h:29
@ MACDomain
Definition exception.h:33
@ ParseDomain
Definition exception.h:38
@ CipherDomain
Definition exception.h:34
@ KeyringDomain
Definition exception.h:37
@ EntropyDomain
Definition exception.h:31
@ ResourceDomain
Definition exception.h:43
@ KeymapDomain
Definition exception.h:35
@ StringDomain
Definition exception.h:42
ExceptionType
Definition exception.h:60
@ MACFatalError
Definition exception.h:106
@ FatalErrorException
Definition exception.h:102
@ UserWarning
Definition exception.h:74
@ ParseWarning
Definition exception.h:73
@ FileError
Definition exception.h:99
@ AuthenticateError
Definition exception.h:91
@ UserFatalError
Definition exception.h:114
@ UndefinedException
Definition exception.h:61
@ LogFatalError
Definition exception.h:117
@ CipherFatalError
Definition exception.h:109
@ ResourceWarning
Definition exception.h:81
@ OptionWarning
Definition exception.h:63
@ ResourceFatalError
Definition exception.h:121
@ BlobWarning
Definition exception.h:80
@ ConfigureError
Definition exception.h:88
@ HashFatalError
Definition exception.h:105
@ KeymapError
Definition exception.h:90
@ RandomWarning
Definition exception.h:64
@ WarningException
Definition exception.h:62
@ MACWarning
Definition exception.h:66
@ KeyringFatalError
Definition exception.h:112
@ EntropyError
Definition exception.h:87
@ BlobError
Definition exception.h:100
@ EntropyFatalError
Definition exception.h:107
@ ConfigureWarning
Definition exception.h:68
@ SplayTreeWarning
Definition exception.h:75
@ CipherWarning
Definition exception.h:69
@ UserError
Definition exception.h:94
@ SplayTreeError
Definition exception.h:95
@ EntropyWarning
Definition exception.h:67
@ BlobFatalError
Definition exception.h:120
@ SplayTreeFatalError
Definition exception.h:115
@ KeyringError
Definition exception.h:92
@ HashWarning
Definition exception.h:65
@ RandomFatalError
Definition exception.h:104
@ ResourceError
Definition exception.h:101
@ OptionFatalError
Definition exception.h:103
@ MACError
Definition exception.h:86
@ KeyringWarning
Definition exception.h:72
@ ErrorException
Definition exception.h:82
@ ParseError
Definition exception.h:93
@ KeymapFatalError
Definition exception.h:110
@ ParseFatalError
Definition exception.h:113
@ HashmapFatalError
Definition exception.h:116
@ LogError
Definition exception.h:97
@ AuthenticateWarning
Definition exception.h:71
@ ConfigureFatalError
Definition exception.h:108
@ HashError
Definition exception.h:85
@ StringFatalError
Definition exception.h:118
@ RandomError
Definition exception.h:84
@ AuthenticateFatalError
Definition exception.h:111
@ FileFatalError
Definition exception.h:119
@ KeymapWarning
Definition exception.h:70
@ LogWarning
Definition exception.h:77
@ OptionError
Definition exception.h:83
@ StringError
Definition exception.h:98
@ CipherError
Definition exception.h:89
@ StringWarning
Definition exception.h:78
@ HashmapError
Definition exception.h:96
@ FileWarning
Definition exception.h:79
@ HashmapWarning
Definition exception.h:76
WizardExport const char * GetLocaleMessage(const char *)
Definition locale.c:739
WizardExport WizardBooleanType ListLocaleInfo(FILE *, ExceptionInfo *)
void(* WarningHandler)(const ExceptionType, const char *, const char *)
Definition exception.h:134
WizardExport WizardBooleanType ThrowWizardException(ExceptionInfo *, const char *, const char *, const size_t, const ExceptionType, const char *,...) wizard_attribute((__format__(__printf__
WizardExport WizardBooleanType WizardExport void CatchException(ExceptionInfo *)
WizardExport WizardBooleanType WizardExport void WizardWarning(const ExceptionType, const char *, const char *)
Definition exception.c:783
WizardExport WizardBooleanType WizardExport void WizardError(const ExceptionType, const char *, const char *)
WizardExport ErrorHandler SetErrorHandler(ErrorHandler)
Definition exception.c:813
WizardExport ExceptionInfo * AcquireExceptionInfo(void)
void(* FatalErrorHandler)(const ExceptionType, const char *, const char *)
Definition exception.h:131
WizardExport WizardBooleanType WizardExport void DestroyLocaleInfo(void)
void(* ErrorHandler)(const ExceptionType, const char *, const char *)
Definition exception.h:128
WizardExport ExceptionType GetExceptionSeverity(const ExceptionInfo *)
Definition exception.c:627
WizardExport FatalErrorHandler SetFatalErrorHandler(FatalErrorHandler)
Definition exception.c:846
WizardExport WizardBooleanType WizardExport void WizardFatalError(const ExceptionType, const char *, const char *)
WizardExport WizardBooleanType WizardExport void ClearWizardException(ExceptionInfo *)
WizardExport char * GetExceptionMessage(const int)
Definition exception.c:471
WizardExport const char * GetLocaleExceptionMessage(const ExceptionType, const char *)
WizardExport WarningHandler SetWarningHandler(WarningHandler)
Definition exception.c:879
WizardExport WizardBooleanType WizardExport void InheritException(ExceptionInfo *, const ExceptionInfo *)
WizardExport WizardBooleanType WizardExport void GetExceptionInfo(ExceptionInfo *)
ErrorType
Definition exception.h:48
@ TimeError
Definition exception.h:54
@ AssertError
Definition exception.h:56
@ EnumerateError
Definition exception.h:50
@ KeyError
Definition exception.h:52
@ AuthenticateUserError
Definition exception.h:51
@ MemoryError
Definition exception.h:49
@ HashIOError
Definition exception.h:53
@ TamperError
Definition exception.h:55
WizardExport WizardBooleanType ThrowException(ExceptionInfo *, const ExceptionType, const char *, const char *)
WizardExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *)
Definition exception.c:399
#define wizard_attribute(x)
#define WizardExport
WizardBooleanType
Definition wizard-type.h:26