WizardsToolkit  1.0.7
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

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

Definition at line 282 of file exception.c.

References GetClientName().

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

Definition at line 323 of file exception.c.

References GetClientName(), and WizardsToolkitTerminus().

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

Definition at line 365 of file exception.c.

References GetClientName().

static void* DestroyExceptionElement ( void *  exception) [static]
WizardExport char* GetExceptionMessage ( const int  error)

Definition at line 471 of file exception.c.

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

WizardExport ExceptionType GetExceptionSeverity ( const ExceptionInfo exception)

Definition at line 627 of file exception.c.

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

WizardExport const char* GetLocaleExceptionMessage ( const ExceptionType  severity,
const char *  tag 
)
WizardExport ErrorHandler SetErrorHandler ( ErrorHandler  handler)

Definition at line 813 of file exception.c.

References error_handler.

WizardExport FatalErrorHandler SetFatalErrorHandler ( FatalErrorHandler  handler)

Definition at line 846 of file exception.c.

References fatal_error_handler.

WizardExport WarningHandler SetWarningHandler ( WarningHandler  handler)

Definition at line 879 of file exception.c.

References warning_handler.

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 
)

Definition at line 713 of file exception.c.

References error_handler.

Referenced by CatchException().

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

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

ErrorHandler error_handler = DefaultErrorHandler [static]

Definition at line 99 of file exception.c.

Referenced by WizardError(), and SetErrorHandler().

FatalErrorHandler fatal_error_handler = DefaultFatalErrorHandler [static]

Definition at line 102 of file exception.c.

Referenced by WizardFatalError(), and SetFatalErrorHandler().

WarningHandler warning_handler = DefaultWarningHandler [static]

Definition at line 105 of file exception.c.

Referenced by WizardWarning(), and SetWarningHandler().