MagickCore 7.0.10
exception.h File Reference
#include "wizard/semaphore.h"
Include dependency graph for exception.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _ExceptionInfo ExceptionInfo
 
typedef void(* ErrorHandler) (const ExceptionType, const char *, const char *)
 
typedef void(* FatalErrorHandler) (const ExceptionType, const char *, const char *)
 
typedef void(* WarningHandler) (const ExceptionType, const char *, const char *)
 

Enumerations

enum  DomainType {
  RandomDomain = 0 , HashDomain = 1 , EntropyDomain = 2 , RepairDomain = 3 ,
  MACDomain = 4 , CipherDomain = 5 , KeymapDomain = 6 , AuthenticateDomain = 7 ,
  KeyringDomain = 8 , ParseDomain = 9 , UserDomain = 10 , CacheDomain = 11 ,
  LogDomain = 12 , StringDomain = 13 , ResourceDomain = 14 , MiscellaneousDomain = 15
}
 
enum  ErrorType {
  MemoryError = 0 , EnumerateError = 1 , AuthenticateUserError = 2 , KeyError = 3 ,
  HashIOError = 4 , TimeError = 5 , TamperError = 6 , AssertError = 7
}
 
enum  ExceptionType {
  UndefinedException , WarningException = 300 , OptionWarning = 305 , RandomWarning = 310 ,
  HashWarning = 315 , MACWarning = 320 , EntropyWarning = 325 , ConfigureWarning = 330 ,
  CipherWarning = 335 , KeymapWarning = 340 , AuthenticateWarning = 345 , KeyringWarning = 350 ,
  ParseWarning = 355 , UserWarning = 360 , SplayTreeWarning = 365 , HashmapWarning = 370 ,
  LogWarning = 375 , StringWarning = 380 , FileWarning = 385 , BlobWarning = 390 ,
  ResourceWarning = 395 , ErrorException = 400 , OptionError = 405 , RandomError = 410 ,
  HashError = 415 , MACError = 420 , EntropyError = 425 , ConfigureError = 430 ,
  CipherError = 435 , KeymapError = 440 , AuthenticateError = 445 , KeyringError = 450 ,
  ParseError = 455 , UserError = 460 , SplayTreeError = 465 , HashmapError = 470 ,
  LogError = 475 , StringError = 480 , FileError = 485 , BlobError = 490 ,
  ResourceError = 495 , FatalErrorException = 700 , OptionFatalError = 705 , RandomFatalError = 710 ,
  HashFatalError = 715 , MACFatalError = 720 , EntropyFatalError = 725 , ConfigureFatalError = 730 ,
  CipherFatalError = 735 , KeymapFatalError = 740 , AuthenticateFatalError = 745 , KeyringFatalError = 750 ,
  ParseFatalError = 755 , UserFatalError = 760 , SplayTreeFatalError = 765 , HashmapFatalError = 770 ,
  LogFatalError = 775 , StringFatalError = 780 , FileFatalError = 785 , BlobFatalError = 790 ,
  ResourceFatalError = 795
}
 

Functions

WizardExport char * GetExceptionMessage (const int)
 
WizardExport const char * GetLocaleExceptionMessage (const ExceptionType, const char *)
 
WizardExport const char * GetLocaleMessage (const char *)
 
WizardExport ErrorHandler SetErrorHandler (ErrorHandler)
 
WizardExport ExceptionInfoAcquireExceptionInfo (void)
 
WizardExport ExceptionInfoDestroyExceptionInfo (ExceptionInfo *)
 
WizardExport ExceptionType GetExceptionSeverity (const ExceptionInfo *)
 
WizardExport FatalErrorHandler SetFatalErrorHandler (FatalErrorHandler)
 
WizardExport WizardBooleanType ListLocaleInfo (FILE *, ExceptionInfo *)
 
WizardExport WizardBooleanType ThrowException (ExceptionInfo *, const ExceptionType, const char *, const char *)
 
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 ClearWizardException (ExceptionInfo *)
 
WizardExport WizardBooleanType WizardExport void DestroyLocaleInfo (void)
 
WizardExport WizardBooleanType WizardExport void GetExceptionInfo (ExceptionInfo *)
 
WizardExport WizardBooleanType WizardExport void InheritException (ExceptionInfo *, const ExceptionInfo *)
 
WizardExport WizardBooleanType WizardExport void WizardError (const ExceptionType, const char *, const char *)
 
WizardExport WizardBooleanType WizardExport void WizardFatalError (const ExceptionType, const char *, const char *)
 
WizardExport WizardBooleanType WizardExport void WizardWarning (const ExceptionType, const char *, const char *)
 
WizardExport WarningHandler SetWarningHandler (WarningHandler)
 

Typedef Documentation

◆ ErrorHandler

typedef void(* ErrorHandler) (const ExceptionType, const char *, const char *)

Definition at line 127 of file exception.h.

◆ ExceptionInfo

typedef struct _ExceptionInfo ExceptionInfo

Definition at line 125 of file exception.h.

◆ FatalErrorHandler

typedef void(* FatalErrorHandler) (const ExceptionType, const char *, const char *)

Definition at line 130 of file exception.h.

◆ WarningHandler

typedef void(* WarningHandler) (const ExceptionType, const char *, const char *)

Definition at line 133 of file exception.h.

Enumeration Type Documentation

◆ DomainType

enum DomainType
Enumerator
RandomDomain 
HashDomain 
EntropyDomain 
RepairDomain 
MACDomain 
CipherDomain 
KeymapDomain 
AuthenticateDomain 
KeyringDomain 
ParseDomain 
UserDomain 
CacheDomain 
LogDomain 
StringDomain 
ResourceDomain 
MiscellaneousDomain 

Definition at line 27 of file exception.h.

◆ ErrorType

enum ErrorType
Enumerator
MemoryError 
EnumerateError 
AuthenticateUserError 
KeyError 
HashIOError 
TimeError 
TamperError 
AssertError 

Definition at line 47 of file exception.h.

◆ ExceptionType

Enumerator
UndefinedException 
WarningException 
OptionWarning 
RandomWarning 
HashWarning 
MACWarning 
EntropyWarning 
ConfigureWarning 
CipherWarning 
KeymapWarning 
AuthenticateWarning 
KeyringWarning 
ParseWarning 
UserWarning 
SplayTreeWarning 
HashmapWarning 
LogWarning 
StringWarning 
FileWarning 
BlobWarning 
ResourceWarning 
ErrorException 
OptionError 
RandomError 
HashError 
MACError 
EntropyError 
ConfigureError 
CipherError 
KeymapError 
AuthenticateError 
KeyringError 
ParseError 
UserError 
SplayTreeError 
HashmapError 
LogError 
StringError 
FileError 
BlobError 
ResourceError 
FatalErrorException 
OptionFatalError 
RandomFatalError 
HashFatalError 
MACFatalError 
EntropyFatalError 
ConfigureFatalError 
CipherFatalError 
KeymapFatalError 
AuthenticateFatalError 
KeyringFatalError 
ParseFatalError 
UserFatalError 
SplayTreeFatalError 
HashmapFatalError 
LogFatalError 
StringFatalError 
FileFatalError 
BlobFatalError 
ResourceFatalError 

Definition at line 59 of file exception.h.

Function Documentation

◆ AcquireExceptionInfo()

WizardExport ExceptionInfo * AcquireExceptionInfo ( void  )

◆ CatchException()

◆ ClearWizardException()

WizardExport WizardBooleanType WizardExport void ClearWizardException ( ExceptionInfo )

◆ DestroyExceptionInfo()

◆ DestroyLocaleInfo()

WizardExport WizardBooleanType WizardExport void DestroyLocaleInfo ( void  )

◆ GetExceptionInfo()

◆ GetExceptionMessage()

WizardExport char * GetExceptionMessage ( const int  error)

Definition at line 471 of file exception.c.

References ConstantString(), CopyWizardString(), and WizardPathExtent.

◆ GetExceptionSeverity()

WizardExport ExceptionType GetExceptionSeverity ( const ExceptionInfo exception)

Definition at line 627 of file exception.c.

References _ExceptionInfo::severity, _ExceptionInfo::signature, and WizardSignature.

◆ GetLocaleExceptionMessage()

WizardExport const char * GetLocaleExceptionMessage ( const ExceptionType  ,
const char *   
)

◆ GetLocaleMessage()

WizardExport const char * GetLocaleMessage ( const char *  tag)

◆ InheritException()

WizardExport WizardBooleanType WizardExport void InheritException ( ExceptionInfo ,
const ExceptionInfo  
)

◆ ListLocaleInfo()

WizardExport WizardBooleanType ListLocaleInfo ( FILE *  ,
ExceptionInfo  
)

◆ SetErrorHandler()

WizardExport ErrorHandler SetErrorHandler ( ErrorHandler  handler)

Definition at line 813 of file exception.c.

References error_handler.

◆ SetFatalErrorHandler()

WizardExport FatalErrorHandler SetFatalErrorHandler ( FatalErrorHandler  handler)

Definition at line 846 of file exception.c.

References fatal_error_handler.

Referenced by LoadLocaleCache().

◆ SetWarningHandler()

WizardExport WarningHandler SetWarningHandler ( WarningHandler  handler)

Definition at line 879 of file exception.c.

References warning_handler.

◆ ThrowException()

WizardExport WizardBooleanType ThrowException ( ExceptionInfo ,
const ExceptionType  ,
const char *  ,
const char *   
)

◆ ThrowWizardException()

WizardExport WizardBooleanType ThrowWizardException ( ExceptionInfo ,
const char *  ,
const char *  ,
const size_t  ,
const ExceptionType  ,
const char *  ,
  ... 
)

◆ WizardError()

WizardExport WizardBooleanType WizardExport void WizardError ( const ExceptionType  ,
const char *  ,
const char *   
)

◆ WizardFatalError()

WizardExport WizardBooleanType WizardExport void WizardFatalError ( const ExceptionType  ,
const char *  ,
const char *   
)

◆ WizardWarning()

WizardExport WizardBooleanType WizardExport void WizardWarning ( const ExceptionType  warning,
const char *  reason,
const char *  description 
)

Definition at line 783 of file exception.c.

References warning_handler.

Referenced by CatchException().