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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:38:05+00:00 2026-05-31T22:38:05+00:00

Today I think i might have learned something (not sure), i’m not really a

  • 0

Today I think i might have learned something (not sure), i’m not really a obj-c programmer, more the php & java type, but building a iPhone app together with somebody got me this, so hopefully somebody can help me explain what and why:

I’ve put some code inside a @try {..} and @catch (NSException * e) {..} and my thought was everything would have been caught by that, but the other developer put and assert(false); at the end of the function, after de catch.

Why?

  • 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-31T22:38:06+00:00Added an answer on May 31, 2026 at 10:38 pm

    assert(3) is not part of Objective-C itself. It’s part of the C standard. Check out the man page. From the C spec, section 7.2.1.1 The assert macro:

    Synopsis

        #include <assert.h>
        void assert(scalar expression);
    

    Description

    The assert macro puts diagnostic tests into programs; it expands to a void expression. When it is executed, if expression (which shall have a scalar type) is false (that is, compares equal to 0), the assert macro writes information about the particular call that failed (including the text of the argument, the name of the source file, the source line number, and the name of the enclosing function — the latter are respectively the values of the preprocessing macros __FILE__ and __LINE__ and of the identifier __func__) on the standard error stream in an implementation-defined format. It then calls the abort function.

    So assert(false) will just crash the program at that point.

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

Sidebar

Related Questions

Im a pretty experienced programmer in PHP and mainly web languages but today i
I am 80% sure I should not be asking this question because it might
Today I fixed a bug in an application that might have lead to an
So I just got my site kicked off the server today and I think
Today I found LiquiBase project and I think it is very interesting. I would
Today I got this question for which I think I answered very bad. I
I would like to think that some of the software I'm writing today will
Attended an interesting demo on REST today, however, I couldn't think of a single
I've been trying to get setup with Ruby on Rails today, but I think
today I've a design question, to have an easy to read code. Should we

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.