mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-29 05:05:34 +08:00
update errorDescription method
This commit is contained in:
@@ -71,7 +71,11 @@
|
|||||||
if (_error != nil) {
|
if (_error != nil) {
|
||||||
desc = [_error localizedDescription];
|
desc = [_error localizedDescription];
|
||||||
} else {
|
} else {
|
||||||
desc = [[(Element*)[self payloadXMLDocument] selectElement:@"error"] contentsText];
|
NSString* contentsText = [[(Element*)[self payloadXMLDocument] selectElement:@"error"] contentsText];
|
||||||
|
if (contentsText == nil) {
|
||||||
|
contentsText = @"";
|
||||||
|
}
|
||||||
|
desc = [NSString stringWithFormat:@"#%d %@", [self statusCode], contentsText];
|
||||||
}
|
}
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user