m+I0error - ImageMagick Error Methods>j Pair








NAME

(

error - ImageMagick Error Methods






(

SYNOPSIS

I

CatchException( const ExceptionInfo *exception );

O

void DestroyExceptionInfo( ExceptionInfo *exception );

E

GetExceptionInfo( ExceptionInfo *exception );

t

void MagickError( const ExceptionType error, const char *reason, const char *description );

x

void MagickWarning( const ExceptionType warning, const char *reason, const char *description );

N

ErrorHandler SetErrorHandler( ErrorHandler handler );

]

SetExceptionInfo( ExceptionInfo *exception, ExceptionType severity );

P

ErrorHandler SetWarningHandler( ErrorHandler handler );

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






B

FUNCTION DESCRIPTIONS





4

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 ( const ExceptionInfo *exception );

A description of each parameter follows:


I
o exception:


The exception info.





@

DestroyExceptionInfo

DestroyExceptionInfo() deallocates memory associated with exception.

The format of the DestroyExceptionInfo method is:

void DestroyExceptionInfo ( ExceptionInfo *exception );

A description of each parameter follows:


'
o exception:


The exception info.





8

GetExceptionInfo

GetExceptionInfo() initializes an exception to default values.

The format of the GetExceptionInfo method is:

GetExceptionInfo ( ExceptionInfo *exception );

A description of each parameter follows:


'
o exception:


The exception info.





.

MagickError

O

Method MagickError calls the error handler methods with an error reason.

/

The format of the MagickError method is:

void MagickError ( const ExceptionType error, const char *reason, const char *description );

A description of each parameter follows:


'
o exception:


%Specifies the numeric error category.


C
o reason:


?Specifies the reason to display before terminating the program.


M
o description:


(Specifies any description to the reason.

b

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

/

The format of the MagickError method is:


G    void MagickFatalError(const ExceptionType error,const char *reason,$      const char *description)
/

A description of each parameter follows:


'
o exception:


%Specifies the numeric error category.


$
o reason:


?Specifies the reason to display before terminating the program.


)
o description:


(Specifies any description to the reason.





2

MagickWarning

T

Method MagickWarning calls the warning handler methods with a warning reason.

1

The format of the MagickWarning method is:

void MagickWarning ( const ExceptionType warning, const char *reason, const char *description );

A description of each parameter follows:


E
o warning:


The warning severity.


$
o reason:


"Define the reason for the warning.


)
o description:


Describe the warning.





6

SetErrorHandler

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

The format of the SetErrorHandler method is:


ErrorHandler SetErrorHandler ( ErrorHandler handler );

A description of each parameter follows:


E
o handler:


The method to handle errors.





8

SetExceptionInfo

|
SetExceptionInfo() set the exception severity.

The format of the SetExceptionInfo method is:

SetExceptionInfo ( ExceptionInfo *exception, ExceptionType severity );

A description of each parameter follows:


'
o exception:


The exception info.


G
o severity:


The exception severity.





@

SetFatalErrorHandler

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

The format of the SetErrorHandler method is:


<    ErrorHandler SetErrorHandler(ErrorHandler handler)
/

A description of each parameter follows:


%
o 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:


%
o handler:


The method to handle warnings.





4

ThrowException

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

The format of the ThrowException method is:


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

A description of each parameter follows:


'
o exception:


The exception.


&
o severity:


%Define the severity of the exception.


$
o reason:


#Define the reason of the exception.


)
o description:


Describe the exception.