How do I check for an error after ?

I have this code in my project:

id mappedData = [dataWithContentsOfMappedFile: path]

Obviously, if mappedData is nil it didn't succeed. But how can I get details about why it didn't succeed? There's no dataWithContentsOfMappedFile:withError:.


Use -dataWithContentsOfFile:options:error:, passing the NSDataReadingMapped constant in the options parameter.

(This constant is known as NSMappedRead if you're not compiling against the iOS 4.0 SDK.)

Need Your Help

How can I reference a section by number in org-mode export?

emacs org-mode

I'm working in org-mode and trying to generate a link to reference a section by its number, not its title.

How to test PRNG?

testing random prng

Lately I implemented a MersenneTwister for 64-bit integer (or long). Is there a guide or examples of how to test PRNG so that I may know whether or not my implementation is good-enough solution. I'm

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.