PXException Class Reference
| Inherits from | NSException |
| Declared in | PXException.h PXException.m |
Overview
The base class of all exceptions in the Pixelwave framework. To catch exceptions associated only with the Pixelwave engine, one would do the following:
@try
{
// ... Execute Pixelwave code
}
@catch (PXException *e)
{
// ... Handle Pixelwave exception
}
@finally
{
// ... Perform cleanup
}
Exception handling isn’t the standard way of handling run-time
errors in Objective-C. In Pixelwave exceptions are only thrown to let the
user know when a hard error occured (such as accessing an out-of-bounds
child in a container). For expected run-time errors (such as an incorrect
file path) nil is returned. If Pixelwave is running in debug mode
an error message is usually logged as well.
Tasks
-
– initWithReason:Creates a Pixelwave based exception.
-
– initWithReason:userInfo:Creates a Pixelwave based exception.
Instance Methods
initWithReason:
Creates a Pixelwave based exception.
- (id)initWithReason:(NSString *)_reasonParameters
- reason
A human-readable message string summarizing the reason for the exception
Declared In
PXException.minitWithReason:userInfo:
Creates a Pixelwave based exception.
- (id)initWithReason:(NSString *)_reason userInfo:(NSDictionary *)_userInfoParameters
- userInfo
A dictionary containing user-defined information relating to the exception
- reason
A human-readable message string summarizing the reason for the exception
Declared In
PXException.m