Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7652415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:45:47+00:00 2026-05-31T11:45:47+00:00

I learned that Objective-C has an equivalent way of handling exceptions like C# does

  • 0

I learned that Objective-C has an equivalent way of handling exceptions like C# does in .NET.
Furthermore as the apple docs says, I’d like to handle/process exceptions, creating an NSError-object.
Taking a close look at the section “Catching Different Types of Exception”
in the docs exception handling

….I would like to catch different types of exception. In .NET I am used to browse the doc of a class-method to get the possible exceptions it can raise.
Where to get this information from the apple-docs?
How do I know, what kind of exceptions a -method/object/process- can raise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:45:49+00:00Added an answer on May 31, 2026 at 11:45 am

    As Apple’s documentation says, most exceptions are thrown in exceptional circumstances. (Some exceptions aren’t, like accessing an object out of NSArray bounds.)

    .NET encourages local exception handling. Cocoa is written to encourage large-scope exception handling. The reason you have local exception handling in .NET is that you expect some part to fail in an expected way (like a network error when downloading something). In Cocoa, this is handled by using methods that return NSErrors instead. It’s the same thing, only more visible in the method signature.

    A good rule of thumb is that Cocoa only throws an exception in situations where it’s unclear how you would even recover. (Don’t mistake this for exceptions being thrown all over the place like in .NET and being this difficult to handle.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've learned that static scoping is the only sane way to do things, and
Block variable in objective-c is a reference and I learned from somewhere infer that
I learned that haptic feedback on a button press on Android has to be
I learned that Sessions are no longer the recommended way to preserve data in
Today I learned that one of the .NET libraries I use, OpenTK, requires me
I've learned that it's possible to embed an image in an HTML page like
I learned that the name attribute has been deprecated. But this is how I
I learned that Python class attributes are like static data members in C++. However,
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
I learned that by trying to use the tablesorter plug in from jquery the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.