Unix
Mac OS X
Windows
Options
Unix
Windows

# Module exception Methods

## AcquireExceptionInfo

AcquireExceptionInfo() allocates the ExceptionInfo structure.

The format of the AcquireExceptionInfo method is:

      ExceptionInfo *AcquireExceptionInfo(void)

## ClearWizardException

ClearWizardException() clears any exception that may not have been caught yet.

The format of the ClearWizardException method is:

      ClearWizardException(ExceptionInfo *exception)

A description of each parameter follows:

##### exception

The exception info.

## CatchException

CatchException() returns if no exceptions is found otherwise it reports the exception as a warning, error, or fatal depending on the severity.

The format of the CatchException method is:

      CatchException(ExceptionInfo *exception)

A description of each parameter follows:

##### exception

The exception info.

## DestroyExceptionInfo

DestroyExceptionInfo() deallocates memory associated with an exception.

The format of the DestroyExceptionInfo method is:

      ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception)

A description of each parameter follows:

##### exception

The exception info.

## GetExceptionInfo

GetExceptionInfo() initializes an exception to default values.

The format of the GetExceptionInfo method is:

      GetExceptionInfo(ExceptionInfo *exception)

A description of each parameter follows:

##### exception

The exception info.

## GetExceptionMessage

GetExceptionMessage() returns the error message defined by the specified error code.

The format of the GetExceptionMessage method is:

      char *GetExceptionMessage(const int error)

A description of each parameter follows:

##### error

the error code.

## GetLocaleExceptionMessage

GetLocaleExceptionMessage() converts a enumerated exception severity and tag to a message in the current locale.

The format of the GetLocaleExceptionMessage method is:

      const char *GetLocaleExceptionMessage(const ExceptionType severity,
        const char *tag)

A description of each parameter follows:

##### severity

the severity of the exception.

##### tag

the message tag.

## GetExceptionSeverity

GetExceptionSeverity() returns the exception severity.

The format of the GetExceptionSeverity method is:

      ExceptionType GetExceptionSeverity(const ExceptionInfo *exception)

A description of each parameter follows:

##### exception

The exception.

## InheritException

InheritException() inherits an exception from a related exception.

The format of the InheritException method is:

      InheritException(ExceptionInfo *exception,const ExceptionInfo *relative)

A description of each parameter follows:

##### exception

The exception info.

##### relative

The related exception info.

## WizardError

WizardError() calls the exception handler methods with an error reason.

The format of the WizardError method is:

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

A description of each parameter follows:

##### exception

Specifies the numeric error category.

##### reason

Specifies the reason to display before terminating the program.

##### description

Specifies any description to the reason.

## WizardFatalError

WizardFatalError() calls the fatal exception handler methods with an error reason.

The format of the WizardError method is:

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

A description of each parameter follows:

##### exception

Specifies the numeric error category.

##### reason

Specifies the reason to display before terminating the program.

##### description

Specifies any description to the reason.

## WizardWarning

WizardWarning() calls the warning handler methods with a warning reason.

The format of the WizardWarning method is:

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

A description of each parameter follows:

##### warning

The warning severity.

##### reason

Define the reason for the warning.

##### description

Describe the warning.

## SetErrorHandler

SetErrorHandler() sets the exception handler to the specified method and returns the previous exception handler.

The format of the SetErrorHandler method is:

      ErrorHandler SetErrorHandler(ErrorHandler handler)

A description of each parameter follows:

##### handler

The method to handle errors.

## SetFatalErrorHandler

SetFatalErrorHandler() sets the fatal exception handler to the specified method and returns the previous fatal exception handler.

The format of the SetErrorHandler method is:

      ErrorHandler SetErrorHandler(ErrorHandler handler)

A description of each parameter follows:

##### handler

The method to handle errors.

## SetWarningHandler

SetWarningHandler() sets the warning handler to the specified method and returns the previous warning handler.

The format of the SetWarningHandler method is:

      ErrorHandler SetWarningHandler(ErrorHandler handler)

A description of each parameter follows:

##### handler

The method to handle warnings.

## ThrowException

ThrowException() throws an exception with the specified severity code, reason, and optional description.

The format of the ThrowException method is:

      WizardBooleanType ThrowException(ExceptionInfo *exception,
        const ExceptionType severity,const char *reason,
        const char *description)

A description of each parameter follows:

##### exception

The exception info.

##### severity

The severity of the exception.

##### reason

The reason for the exception.

##### description

The exception description.

Discourse Server