NSInvalidArgumentException

E821135

NSInvalidArgumentException is a Cocoa/Cocoa Touch exception type thrown when a method receives an invalid or inappropriate argument.

All labels observed (1)

Label Occurrences
NSInvalidArgumentException canonical 2

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf Cocoa Touch exception
Cocoa exception
Objective-C exception type
belongsToFrameworkFamily Foundation
bestPractice avoid by checking method parameters
canBeCaughtAs NSException
category runtime exception
commonCause calling method with wrong type of argument
invalid parameter value
passing nil where nonnull is required
unrecognized selector sent to instance
definedIn Cocoa
Cocoa Touch
Foundation framework
distinguishedFrom NSError-based recoverable errors
documentationSection Exceptions in Foundation Framework
errorDomain NSException
handledBy @try-@catch blocks in Objective-C
introducedBy Apple
linked to: Apple Inc.
isFatalByDefault true
language Objective-C
loggingBehavior includes name and reason in exception description
nameConstantType NSString *
namespace Foundation
relatedConcept NSGenericException
linked to: NSException

NSInternalInconsistencyException
NSRangeException
relatedTo NSException
requires programmer to validate arguments
role indicates programmer error in API usage
superclassType NSException
thrownBy Objective-C runtime
thrownInContext Cocoa API parameter validation
Objective-C message dispatch
thrownWhen method receives inappropriate argument
method receives invalid argument
typicalHandling crash if uncaught
typicalReasonString "*** -[Class method]: unrecognized selector sent to instance"
usagePattern checked in @catch(NSException *exception) blocks
usedInLanguage Objective-C
usedInPlatform iOS
macOS
tvOS
watchOS
usedSince early versions of Cocoa
usedWith NSExceptionName

How these facts were elicited

Referenced by (2)

Full triples — surface form annotated when it differs from this entity's canonical label.

NSException hasSubclass NSInvalidArgumentException
NSInternalInconsistencyException relatedTo NSInvalidArgumentException