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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:10:12+00:00 2026-06-14T09:10:12+00:00

Looking at the Error Handling Programming Guide , I understand that in cases like

  • 0

Looking at the Error Handling Programming Guide, I understand that in cases like the following I must never evaluate the NSError parameter theError unless the return value is NO

BOOL success = [myDoc writeToURL:[self docURL] ofType:@"html" error:&theError];

What happens in casses when the return value is not a success BOOL, and instead it is a collection object?

Take for example [NSIncrementalStore obtainPermanentIDsForObjects:error]. I must not evaluate an error using the error parameter. What should I look for? I imagine I could receive either a nil pointer or an empty array. In this case an empty array does not seem a good response, although in other functions an empty array might be a good one. I can read that if an error occurs, the error object will contain a description of what happened, but it is not so clear how can I find out that an error actually happened.

What is the normal Cocoa or Foundation way to indicate an error in cases like these?

  • 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-14T09:10:14+00:00Added an answer on June 14, 2026 at 9:10 am

    For that method, you’re expected to return an array of as many items as you had objects passed in. I’d say that if you don’t do that (either the array is nil or empty), you’re in an error condition, since you’re violating what the documentation says will happen:

    An array containing the object IDs for the objects in array.

    The returned array must return the object IDs in the same order as the objects appear in array

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

Sidebar

Related Questions

My use case is that I would like to do error handling in sinatra.
I have a really frustrating error that I've spent hours looking at and cannot
I've been looking all over the internet for a solution to the following error;
I've noticed yesterday by looking into my apache error log that someone tried to
I'm looking into re-working and simplifying our error handling in an application I support.
I got into the habit of coding my error handling this way: NSError* error
Using the following error handling in Application_Error(): protected void Application_Error() { Exception exception =
I'm looking to run a bit of custom error handling for PHP's parse errors
I'm looking to improve error handling and debugging in my PHP programs and need
Here's the gist of the code I am looking to incorporate error handling into.

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.