BlitzMax Extended  0.8.19
Pushing Blitz to the Max.
Data Structures | Functions
blitz_exception.h File Reference

Basic exception class. More...

#include "_common.h"

Go to the source code of this file.

Data Structures

struct  BBException
 Base for all exceptions. More...

Functions

BBExceptionbbExceptionGetCause (const BBException *ex)
 Gets the cause of an exception.
void bbExceptionInitCause (BBException *ex, BBException *cause)
 Initializes the cause of an exception.

Detailed Description

Basic exception class.

A minimalist common interface for all exceptions.

Author:
Fabian Niemann

Function Documentation

BBException* bbExceptionGetCause ( const BBException ex)

Gets the cause of an exception.

See also:
bbExceptionInitCause
Parameters:
exThe exception whose cause is returned
Returns:
The cause of the exception or BBNULL if no known one was given.
void bbExceptionInitCause ( BBException ex,
BBException cause 
)

Initializes the cause of an exception.

Initializing an exception's cause can only be done once, usually in the classes own "Create" function. However it can also be done afterwards, in case the process of creation does not automatically take care of it.

Note:
An exception can not be caused by itself. Therefore initializing an exception object with itself will not work.
Parameters:
exThe exception whose cause should be set
causeThe previous exception that caused the current one