If NSError contains recovery suggestion string, append it to error message as it was until now. However, if recovery string is NIL, do not append it at all.
This MR fixes the "error message\n\n(null)".
This commit is contained in:
parent
2078483f50
commit
f923649801
|
@ -47,7 +47,16 @@ bool KIPLATFORM::ENV::MoveToTrash( const wxString& aPath, wxString& aError )
|
|||
if( result == NO )
|
||||
{
|
||||
NSString* errmsg;
|
||||
errmsg = [err.localizedFailureReason stringByAppendingFormat:@"\n\n%@", err.localizedRecoverySuggestion];
|
||||
|
||||
if( err.localizedRecoverySuggestion == nil )
|
||||
{
|
||||
errmsg = err.localizedFailureReason;
|
||||
}
|
||||
else
|
||||
{
|
||||
errmsg = [err.localizedFailureReason stringByAppendingFormat:@"\n\n%@", err.localizedRecoverySuggestion];
|
||||
}
|
||||
|
||||
aError = wxCFStringRef::AsString( (CFStringRef) errmsg );
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue