What's the best way to throw an exception in objective-c/cocoa?
转载于:https://stackoverflow.com/questions/324284/throwing-an-exception-in-objective-c-cocoa
What's the best way to throw an exception in objective-c/cocoa?
转载于:https://stackoverflow.com/questions/324284/throwing-an-exception-in-objective-c-cocoa
I use [NSException raise:format:]
as follows:
[NSException raise:@"Invalid foo value" format:@"foo of %d is invalid", foo];