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

  • Home
  • SEARCH
  • 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 6162871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:43:46+00:00 2026-05-23T21:43:46+00:00

Reading the documentation and going through the Apple sample codes (and most of the

  • 0

Reading the documentation and going through the Apple sample codes (and most of the third party Objective-C code available out there), I get the impression that you are not supposed to do exception handling by using try/catch and “traditional/C” methods.
Recently I was reading Amazons AWS iOS SDK and noticed that they have used the old method liberally.
This was a relief for me because I always felt that I need to make sure I catch the exception specially when I am using code written by someone else or binary libraries (I mean things like Google Analytics binaries).
My question is, is there any reason to avoid “traditional” exception handeling” on iOS, or it is just not a tasteful Objective-C practice to do that?

  • 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-23T21:43:48+00:00Added an answer on May 23, 2026 at 9:43 pm

    There is every reason to avoid exceptions on iOS.

    Exceptions on iOS are explicitly reserved for catastrophic failure that cannot be recovered from. They are not intended to be used to do catch-and-recover type operations.

    Important: You should reserve the use of exceptions for programming or
    unexpected runtime errors such as out-of-bounds collection access,
    attempts to mutate immutable objects, sending an invalid message, and
    losing the connection to the window server. You usually take care of
    these sorts of errors with exceptions when an application is being
    created rather than at runtime.

    If you have an existing body of code (such as third-party library)
    that uses exceptions to handle error conditions, you may use the code
    as-is in your Cocoa application. But you should ensure that any
    expected runtime exceptions do not escape from these subsystems and
    end up in the caller’s code. For example, a parsing library might use
    exceptions internally to indicate problems and enable a quick exit
    from a parsing state that could be deeply recursive; however, you
    should take care to catch such exceptions at the top level of the
    library and translate them into an appropriate return code or state.

    This leads to two issues (amongst others):

    • you can’t @throw an exception through a frame of system framework code. The behavior is undefined.

    • if you design your code to use exceptions, you’ll have a massive impedance mismatch at the border between your code and the system. Not only will this be awkward, it’ll make all future maintenance and refactoring operations more difficult as that border shifts. It will also make it more difficult to integrate with the system.

    Note that if the AWS SDK is throwing exceptions through stack frame’s owned by the system frameworks, then it is doing it wrong.

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

Sidebar

Related Questions

Reading through documentation, I found following: 1.9.1 1.8.4 1.8.2 A version of 1.8.2 select
Reading Kohana's documentation, I found out that the main difference in 3.0 version is
I was reading the apple documentation for memory management , and came across something
Going through the documentation of the SDF, i found many classes like the BitmapEx
I've spent countless hours reading through documentation all over the place and I'm still
I'm reading up on BeautifulSoup to screen-scrape some pretty heavy html pages. Going through
E-Texteditor recently announced going open-source with their open company model. However after reading through
I'm new to Java, and while reading documentation so far I can't find any
reading the documentation for java org.w3c.dom.ls it seems as a Element only can be
Reading the documentation it seems this might not be possible, but it seems that

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.