I use [NSException raise:format:]
as follows:
[NSException raise:@"Invalid foo value" format:@"foo of %d is invalid", foo];
More Related Contents:
- @class vs. #import
- How do I use NSTimer?
- How to read data from NSFileHandle line by line?
- How to Check if an NSDate occurs between two other NSDates
- Calling -retainCount Considered Harmful
- How do I iterate over an NSArray?
- NSInvocation for Dummies?
- Number of occurrences of a substring in an NSString?
- Hidden Features of Xcode
- @synthesize vs @dynamic, what are the differences?
- What exactly is a so called “Class Cluster” in Objective-C?
- Why are umbrella frameworks discouraged? [closed]
- Regular expressions in an Objective-C Cocoa application
- How to Write OS X Finder plugin
- View-based NSTableView with rows that have dynamic heights
- NSMutableArray – force the array to hold specific object type only
- Best way to remove from NSMutableArray while iterating?
- Difference between NSString literals
- Why is my transformable Core Data attribute not using my custom NSValueTransformer?
- Cocoa Custom Notification Example
- Dispatch queues: How to tell if they’re running and how to stop them
- Embed font in a mac bundle
- Using Swift CFunctionPointer to pass a callback to CoreMIDI API
- using objc_msgSend to call a Objective C function with named arguments
- Call instance method from class method
- Mac Mountain Lion send notification from CLI app
- Best way to make NSRunLoop wait for a flag to be set?
- How to make a smooth, rounded, volume-like OS X window with NSVisualEffectView?
- Class method equivalent of -respondsToSelector:
- Run AppleScript from Cocoa Application