Exception.h File Reference

Constants and definitions for propagating exceptions. More...

Go to the source code of this file.

Classes

struct  _OLCatchInfo
 This is the internal structure used to pass information about exceptions. More...
class  OLException
 This class is used to propagate information about exceptions. More...

Defines

#define OL_CATCH
 Start a catch block.
#define OL_CATCH_ABANDON
 Abandon a catch block.
#define OL_CATCH_RAISE(typ,...)
 Raise a new exception from within a catch block.
#define OL_CATCH_RAISE_STRING(typ,...)
 Raise a new exception from within a catch block.
#define OL_CATCH_RETURN(val)
 Return a value from a catch block.
#define OL_END_CATCH
 End a catch block.
#define OL_TRY
 Start a try block.
#define OL_TRY_ABANDON
 Abandon a try block.
#define OL_TRY_RETURN(val)
 Return a value from a try block.

Typedefs

typedef _OLCatchInfo OLCatchInfo
 The type definition for the internal catch information structure.

Functions

void OLPopCatchInfo ()
 Pop a catch information structure.
void OLPushCatchInfo (OLCatchInfo *info)
 Push a catch information structure.

Variables

OLConstantString *const OLClassNotFoundException
 The name of the exception raised when a class in the stream could not be found.
OLConstantString *const OLEndOfStreamException
 The name of the exception raised when the end of a stream is reached.
OLConstantString *const OLGenericException
 The name of the exception raised when something just went wrong but no one is really sure what it was.
OLConstantString *const OLInputOutputException
 The name of the exception raised when an I/O error occurs.
OLConstantString *const OLInvalidArgumentException
 The name of the exception raised when a an invalid argument is encountered.
OLConstantString *const OLSocketException
 The name of the exception raised when an error occurs during a socket operation.


Detailed Description

Constants and definitions for propagating exceptions.

The constant "strings" that appear in this file represent the names of exceptions that can be raised by ObjectiveLib. The file also contains macros which actually implement the exception handling mechanism. The other stuff in the file is for internal use only.


Define Documentation

#define OL_CATCH

Start a catch block.

#define OL_CATCH_ABANDON

Abandon a catch block.

#define OL_CATCH_RAISE ( typ,
...   ) 

Raise a new exception from within a catch block.

The macro requires arguments of type C "string". For example, OL_CATCH_RAISE("DogException", "My dog has %s", "fleas").

See also:
- initWithType:message:arguments: (OLException)
Parameters:
typ the type or name of the exception to raise
... the variadic argument list, which includes the message itself and any arguments with which the final message should be formatted

#define OL_CATCH_RAISE_STRING ( typ,
...   ) 

Raise a new exception from within a catch block.

This macro takes arguments of type OLConstantString instead of bare C "string" arguments. For example, OL_CATCH_RASE_STRING(@"DogException", @"My dog has %s", "fleas").

Parameters:
typ the type or name of the exception to raise
... the variadic argument list, which includes the message itself and any arguments with which the final message should be formatted

#define OL_CATCH_RETURN ( val   ) 

Return a value from a catch block.

Parameters:
val the value to return

#define OL_END_CATCH

End a catch block.

#define OL_TRY

Start a try block.

#define OL_TRY_ABANDON

Abandon a try block.

#define OL_TRY_RETURN ( val   ) 

Return a value from a try block.

Parameters:
val the value to return


Typedef Documentation

typedef struct _OLCatchInfo OLCatchInfo

The type definition for the internal catch information structure.


Function Documentation

void OLPopCatchInfo (  ) 

Pop a catch information structure.

You never want to use this function. It is for internal use only. Please don't use it.

void OLPushCatchInfo ( OLCatchInfo info  ) 

Push a catch information structure.

You never want to use this function. It is for internal use only. Please don't use it.

Parameters:
info the catch information structure


Variable Documentation

OLConstantString* const OLClassNotFoundException

The name of the exception raised when a class in the stream could not be found.

OLConstantString* const OLEndOfStreamException

The name of the exception raised when the end of a stream is reached.

OLConstantString* const OLGenericException

The name of the exception raised when something just went wrong but no one is really sure what it was.

OLConstantString* const OLInputOutputException

The name of the exception raised when an I/O error occurs.

OLConstantString* const OLInvalidArgumentException

The name of the exception raised when a an invalid argument is encountered.

OLConstantString* const OLSocketException

The name of the exception raised when an error occurs during a socket operation.


ObjectiveLibGenerated Sun Apr 22 15:17:59 2007, © 2004-2007 Will Mason
SourceForge.net Logo