Skip navigation.
 
mlNSError and presentError:
FROM : Seth Willits
DATE : Sun May 25 23:21:02 2008

So why is it that when the standard sheet for presentError: is 
displayed, it only ever uses NSLocalizedDescriptionKey and 
NSLocalizedRecoverySuggestionErrorKey? A lot of NSError objects don't 
have a value for NSLocalizedRecoverySuggestionErrorKey but they do 
have values for NSLocalizedFailureReasonErrorKey. Instead of using the 
failure reason, the sheet just doesn't show anything at all and only 
uses the description.

It's pretty silly to only show _some_ of the information available, 
but the other silly thing is that if I want to use presentError: to 
display an NSError object, I have to supply the *reason* something 
failed with NSLocalizedRecoverySuggestionErrorKey so that the reason 
actually is displayed, despite the fact it's a failure reason and not 
a recovery suggestion.

I could write my own method, and I suppose I probably should, but 
given there's existing methods and callbacks for the presentError: 
path, I wonder why it doesn't work as I think it should.


--
Seth Willits

Related mailsAuthorDate
mlNSError and presentError: Seth Willits May 25, 23:21
mlRe: NSError and presentError: Quincey Morris May 26, 00:14
mlRe: NSError and presentError: Ali Ozer May 26, 00:28