title: fails, but no error object is returned. Why?
body: <p>I'm trying to understand the meaning of the value returned by <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html#//apple_ref/occ/instm/NSData/writeToFile:options:error:" rel="nofollow noreferrer">[NSData writeToFile:options:error:]</a>. The method returns a BOOL, which according to Apple's documentation is "YES if the operation succeeds, otherwise NO."</p>
  
  <p>Fair enough, but if it's NO, I would have assumed that the error parameter would then be set to some retrievable NSError* value. However in results I'm coming across, that's not the case. Accordingly I'm somewhat confused, and don't know how to determine what caused the failure.</p>
  
  <p>To wit, I've got this code (more or less):</p>
  
  <pre><code>NSError* error = nil;
  BOOL success = [data writeToFile: filePath error: &amp;error];
  if ( error )
      NSLog( @"error = %@", [error description] );
  </code></pre>
  
  <p><code>success</code> turns out to be <code>NO</code> in the code I'm running, but the <code>NSLog</code> statement is never executed. How come?</p>
  
  <p>Howard</p>