title: NSKeyedUnarchiver unarchiveObjectWithData returning nil
body: <p>I have a class which serializes and deserializes with <code>NSCoder</code>/<code>NSKeyedArchiver</code> and <code>NSKeyedUnarchiver</code>. I have unit tests that are designed to check for my handling of various errors inside my serialization format (which is not a simple archive but contains archives).</p>
  
  <p>However, since I upgraded to Swift 2/iOS 9, the tests are displaying some unusual behaviour. Previously, the test for invalid archives failed as deserializing an invalid archive threw an Objective-C exception, as the docs state, that crashed the program as Swift cannot catch them.  This is fine, I intended to fix the test at some point in the future.</p>
  
  <p>Now, the test passes. When fed my random or deterministic garbage, I instead receive <code>nil</code> back from <code>unarchiveObjectWithData</code> rather than an exception. I've checked the docs for this method and there's no behaviour change listed. </p>
  
  <p>Frankly, I find this behaviour change to be extremely suspicious as there's no mention anywhere of how or why this change occurred. My previously failing unit tests are just now passing with no apparent reason why.</p>
  
  <p>So is this the new expected behaviour (that it returns <code>nil</code>)? If not, how can I get the actual expected behaviour (the Obj-C exception) rather than the <code>nil</code> for an invalid archive?</p>