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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:05:46+00:00 2026-06-06T01:05:46+00:00

I am developing a Framework for the company that I work for that they

  • 0

I am developing a Framework for the company that I work for that they can use, and I want to be able to print out some runtime warnings to the console if they have lets say passed the wrong parameter into a method I have made, like if they pass nil in when they should have passed self. I know I can do NSLog(), and the preprocessor #warning. But is there anything else I can do to warn the user as #warning will always show up in the editor unless I put it in some preprocessor if statement.

  • 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-06T01:05:49+00:00Added an answer on June 6, 2026 at 1:05 am

    You should use NSAssert for this. It will halt the execution if in debug mode, when running without a debugger, it will print the error to the device log.

    - (void)someSelector:(id)param)
    {
        NSAssert(param != nil, @"Parameter should always be non-nil");
        // do stuff with param
    }
    

    If you prefer, you can also compile for release with NS_BLOCK_ASSERTIONS, then no assertions will be present at all (nothing will be printed, and the tests won’t even be compiled). That way you can avoid the overhead of checking it in the final product.

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

Sidebar

Related Questions

can anybody suggest a framework for developing mobile applications using html5 ? I want
I'm developing a framework that, as one of its features, enables robots to use
Am developing an app using zend framework. I want to update some columns in
I'm developing a framework application, and I want individual implementations to have the possibility
I'm developing a zend framework application that includes a simple email function. The development
I am developing a Compact Framework application that needs to manipulate an existing MS
I am currently developing a private framework for use on WebKit devices. I have
I am developing a framework for reproducible computing with R. One problem that I
I'm developing a compact-framework application for a Windows Mobile device to work with SQLServer
I'm developing out replacements for our company's web service stack. The current stack was

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.