Data Structures | Functions | Variables

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"

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

WizardExport ExceptionInfo* AcquireExceptionInfo ( void   ) 
WizardExport void CatchException ( ExceptionInfo exception  ) 
WizardExport void ClearWizardException ( ExceptionInfo exception  ) 
static void DefaultErrorHandler ( const   ExceptionType,
const char *  ,
const char *   
) [static]
static void DefaultErrorHandler ( const ExceptionType   wizard_unusedseverity,
const char *  reason,
const char *  description 
) [static]

References GetClientName().

static void DefaultFatalErrorHandler ( const ExceptionType  severity,
const char *  reason,
const char *  description 
)
static void DefaultWarningHandler ( const ExceptionType   wizard_unusedseverity,
const char *  reason,
const char *  description 
) [static]

References GetClientName().

static void DefaultWarningHandler ( const   ExceptionType,
const char *  ,
const char *   
)
static void* DestroyExceptionElement ( void *  exception  )  [static]
WizardExport ExceptionInfo* DestroyExceptionInfo ( ExceptionInfo exception  ) 
static const char* ExceptionSeverityToTag ( const ExceptionType  severity  )  [static]
WizardExport void GetExceptionInfo ( ExceptionInfo exception  ) 
WizardExport char* GetExceptionMessage ( const int  error  ) 
WizardExport ExceptionType GetExceptionSeverity ( const ExceptionInfo exception  ) 
WizardExport const char* GetLocaleExceptionMessage ( const ExceptionType  severity,
const char *  tag 
)
WizardExport void InheritException ( ExceptionInfo exception,
const ExceptionInfo relative 
)
WizardExport ErrorHandler SetErrorHandler ( ErrorHandler  handler  ) 

References error_handler.

WizardExport FatalErrorHandler SetFatalErrorHandler ( FatalErrorHandler  handler  ) 

References fatal_error_handler.

WizardExport WarningHandler SetWarningHandler ( WarningHandler  handler  ) 

References warning_handler.

WizardExport WizardBooleanType ThrowException ( ExceptionInfo exception,
const ExceptionType  severity,
const char *  reason,
const char *  description 
)
WizardExport WizardBooleanType ThrowWizardException ( ExceptionInfo exception,
const char *  module,
const char *  function,
const size_t  line,
const ExceptionType  severity,
const char *  format,
  ... 
)
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 void WizardError ( const ExceptionType  error,
const char *  reason,
const char *  description 
)

References error_handler.

Referenced by CatchException().

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

References fatal_error_handler.

Referenced by CatchException().

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

References warning_handler.

Referenced by CatchException().


Variable Documentation

ErrorHandler error_handler = DefaultErrorHandler [static]

Referenced by SetErrorHandler(), and WizardError().

FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler [static]
WarningHandler warning_handler = DefaultWarningHandler [static]

Referenced by SetWarningHandler(), and WizardWarning().