ios - Update NSError UserInfo -
i'm trying update nserror
object more information. example, api call may fail , want update error object returned api class view controller information (method name caused error, client message, additional info). there isn't setter method userinfo
dictionary , trying set value dictionary raises exception (not key value code compliant believe). thought creating new nserror
object updated user info, wasn't sure if might lose information.
question
what's best way update user info dictionary of nserror object?
easiest way mutable copy of userinfo
dictionary , add whatever that. have create new nserror
(since there not setuserinfo: method) same domain , code original one.
Comments
Post a Comment