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 8095769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:14:38+00:00 2026-06-05T21:14:38+00:00

One useful tip I’ve been using for XCode is adding breakpoints on exceptions .

  • 0

One useful tip I’ve been using for XCode is adding breakpoints on exceptions.

I was wondering why we need to add two breakpoints–one for objc_exception_throw and one for [NSException raise].

What cases do one cover that the other doesn’t?

  • 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-06-05T21:14:40+00:00Added an answer on June 5, 2026 at 9:14 pm

    You should only use a breakpoint on objc_exception_throw. The method -[NSException raise] calls objc_exception_throw, so objc_exception_throw covers all cases that -[NSException raise] covers. The other way around is not true: The @throw directive is compiled to call objc_exception_throw directly. This method shows the difference:

    - (void)throwAndCatch
    {
        @try {
            NSException *exception = [[NSException alloc] initWithName:@"Test" 
                                                                reason:@"test" 
                                                              userInfo:nil];
            @throw exception;
        }
        @catch (NSException *exception) {
            NSLog(@"Caught");
        }
    }
    

    When calling -throwAndCatch, a breakpoint on -[NSException raise] has no effect, while a breakpoint on objc_exception_throw will work.

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

Sidebar

Related Questions

I've been googling this one and haven't turned up anything useful: Assuming you use
Gradually I've been using more variants - they can be very useful in certain
I am developing remoting application. Which one will be useful, dot net remoting using
One of my colleagues uses TextPad, and one feature I found really useful is
interfaces provide a useful abstraction capability. One can have a class Foo implement some
I'm working with the very-useful ID3 framework in my cocoa project. There's one tiny
I've found a little tutorial that would be useful for my game: http://blog.mellenthin.de/archives/2012/02/13/an-one-finger-rotation-gesture-recognizer/ But
Having recently learned of the DebuggerDisplay attribute, I've found it quite useful. However, one
One of the neat characteristics of UTF-8 is that if you compare two strings
One immensely useful call in the old REST API is Friends.getAppUsers . This call

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.