MagickCore 7.0.10
exception.c File Reference
#include "wizard/studio.h"
#include "wizard/client.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hashmap.h"
#include "wizard/log.h"
#include "wizard/memory_.h"
#include "wizard/string_.h"
#include "wizard/utility.h"
#include "wizard/wizard.h"
Include dependency graph for exception.c:

Go to the source code of this file.

Data Structures

struct  _ExceptionInfo
 

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 *)
 
WizardExport ExceptionInfoAcquireExceptionInfo (void)
 
static void * DestroyExceptionElement (void *exception)
 
WizardExport void ClearWizardException (ExceptionInfo *exception)
 
WizardExport void CatchException (ExceptionInfo *exception)
 
static void DefaultErrorHandler (const ExceptionType wizard_unused(severity), const char *reason, const char *description)
 
static void DefaultWarningHandler (const ExceptionType wizard_unused(severity), const char *reason, const char *description)
 
WizardExport ExceptionInfoDestroyExceptionInfo (ExceptionInfo *exception)
 
WizardExport void GetExceptionInfo (ExceptionInfo *exception)
 
WizardExport char * GetExceptionMessage (const int error)
 
static const char * ExceptionSeverityToTag (const ExceptionType severity)
 
WizardExport const char * GetLocaleExceptionMessage (const ExceptionType severity, const char *tag)
 
WizardExport ExceptionType GetExceptionSeverity (const ExceptionInfo *exception)
 
WizardExport void InheritException (ExceptionInfo *exception, const ExceptionInfo *relative)
 
WizardExport void WizardError (const ExceptionType error, const char *reason, const char *description)
 
WizardExport void WizardFatalError (const ExceptionType error, const char *reason, const char *description)
 
WizardExport void WizardWarning (const ExceptionType warning, const char *reason, const char *description)
 
WizardExport ErrorHandler SetErrorHandler (ErrorHandler handler)
 
WizardExport FatalErrorHandler SetFatalErrorHandler (FatalErrorHandler handler)
 
WizardExport WarningHandler SetWarningHandler (WarningHandler handler)
 
WizardExport WizardBooleanType ThrowException (ExceptionInfo *exception, const ExceptionType severity, const char *reason, const char *description)
 
WizardExport WizardBooleanType ThrowWizardExceptionList (ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format, va_list operands)
 
WizardExport WizardBooleanType ThrowWizardException (ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format,...)
 

Variables

static ErrorHandler error_handler = DefaultErrorHandler
 
static FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler
 
static WarningHandler warning_handler = DefaultWarningHandler
 

Function Documentation

◆ AcquireExceptionInfo()

◆ CatchException()

◆ ClearWizardException()

◆ DefaultErrorHandler() [1/2]

static void DefaultErrorHandler ( const ExceptionType   wizard_unusedseverity,
const char *  reason,
const char *  description 
)
static

Definition at line 282 of file exception.c.

References GetClientName().

◆ DefaultErrorHandler() [2/2]

static void DefaultErrorHandler ( const ExceptionType  ,
const char *  ,
const char *   
)
static

◆ DefaultFatalErrorHandler()

static void DefaultFatalErrorHandler ( const ExceptionType  severity,
const char *  reason,
const char *  description 
)

Definition at line 323 of file exception.c.

References GetClientName(), and WizardsToolkitTerminus().

◆ DefaultWarningHandler() [1/2]

static void DefaultWarningHandler ( const ExceptionType   wizard_unusedseverity,
const char *  reason,
const char *  description 
)
static

Definition at line 365 of file exception.c.

References GetClientName().

◆ DefaultWarningHandler() [2/2]

static void DefaultWarningHandler ( const ExceptionType  ,
const char *  ,
const char *   
)

◆ DestroyExceptionElement()

static void * DestroyExceptionElement ( void *  exception)
static

◆ DestroyExceptionInfo()

◆ ExceptionSeverityToTag()

◆ 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  severity,
const char *  tag 
)

◆ InheritException()

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

◆ ThrowWizardException()

◆ ThrowWizardExceptionList()

WizardExport WizardBooleanType ThrowWizardExceptionList ( ExceptionInfo exception,
const char *  module,
const char *  function,
const size_t  line,
const ExceptionType  severity,
const char *  format,
va_list  operands 
)

◆ WizardError()

WizardExport void WizardError ( const ExceptionType  error,
const char *  reason,
const char *  description 
)

Definition at line 713 of file exception.c.

References error_handler.

Referenced by CatchException().

◆ WizardFatalError()

WizardExport void WizardFatalError ( const ExceptionType  error,
const char *  reason,
const char *  description 
)

Definition at line 749 of file exception.c.

References fatal_error_handler.

Referenced by CatchException().

◆ WizardWarning()

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

Variable Documentation

◆ error_handler

ErrorHandler error_handler = DefaultErrorHandler
static

Definition at line 99 of file exception.c.

Referenced by SetErrorHandler(), and WizardError().

◆ fatal_error_handler

FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler
static

Definition at line 102 of file exception.c.

Referenced by SetFatalErrorHandler(), and WizardFatalError().

◆ warning_handler

WarningHandler warning_handler = DefaultWarningHandler
static

Definition at line 105 of file exception.c.

Referenced by SetWarningHandler(), and WizardWarning().