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

Instance Methods

initWithReason:

Creates a Pixelwave based exception.

- (id)initWithReason:(NSString *)_reason

Parameters

reason

A human-readable message string summarizing the reason for the exception

Declared In

PXException.m

initWithReason:userInfo:

Creates a Pixelwave based exception.

- (id)initWithReason:(NSString *)_reason userInfo:(NSDictionary *)_userInfo

Parameters

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