| Declared in | NSException+GBException.h<br />NSException+GBException.m |
Adds helper methods to NSException for more organized code.
+ raise:
Raises the exception with the given format.
+ raise:format:
Raises the exception with the given NSError object.
Raises the exception with the given format.
+ (void)raise:(NSString *)formatRaises the exception with the given format.
This is a shortcut for raise:format: method and makes exception creation code much less verbose. As we don't use specialized exception names, this makes sense...
NSException+GBException.hNSException+GBException.m Raises the exception with the given NSError object.
+ (void)raise:(NSError *)error format:(NSString *)format Raises the exception with the given NSError object.
This is useful for converting NSError s into NSException s. The method allows the client to pass in additional context information which further aids diagnosting the exact reason for the exception. If no context information is desired, pass nil and only error information is used for formatting. As exception message can become quite verbose, it is split into several lines to make the output more readable.
NSException+GBException.hNSException+GBException.m