---
title: "Define predifined Generic Exceptions."  
description: "Define predifined Generic Exceptions."  
author: "Tarun Kumar"  
published: 2015-10-27  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/22871/define-predifined-generic-exceptions  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Define predifined Generic Exceptions.

Cocoa provides predefined number of generic exceptions. NSException.h file provides the generic exception names and all of these exception names are string constants.

**Here is some of generic exception names:**

- NSGenericException

- NSRangeException

- NSInvalidArgumentException

- NSObjectInaccessibleException

- NSObjectNotAvailableException

- NSDestinationInvalidException

- NSPortTimeoutException

- NSInvalidSendPortException

- NSInvalidReceivePortException and more…

**Some subsystems of Cocoa defines their own exception names like:**

- NSInconsistentArchiveException

- NSFileHandleOperationException

## Answers

### Answer by Tarun Kumar

Cocoa provides predefined number of generic exceptions. NSException.h file provides the generic exception names and all of these exception names are string constants.

**Here is some of generic exception names:**

- NSGenericException

- NSRangeException

- NSInvalidArgumentException

- NSObjectInaccessibleException

- NSObjectNotAvailableException

- NSDestinationInvalidException

- NSPortTimeoutException

- NSInvalidSendPortException

- NSInvalidReceivePortException and more…

**Some subsystems of Cocoa defines their own exception names like:**

- NSInconsistentArchiveException

- NSFileHandleOperationException


---

Original Source: https://www.mindstick.com/interview/22871/define-predifined-generic-exceptions

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
