从[错误描述]中打印出错误消息

时间:2022-05-18 01:55:53

NSError *error ...

NSError *错误......

This is the result of [error description]:

这是[错误描述]的结果:

从[错误描述]中打印出错误消息

I want to have just this message : Another user is Already linked to this facebook id. Is there any way?

我想要这个消息:另一个用户已经链接到这个facebook id。有什么办法吗?

[error localizeddescription] is also print something else.

[error localizeddescription]也会打印其他内容。

1 个解决方案

#1


1  

Try this:

尝试这个:

NSString *description = [[error userInfo] objectForKey:@"error"];

#1


1  

Try this:

尝试这个:

NSString *description = [[error userInfo] objectForKey:@"error"];