swift - Parse iOS - How to capture the findObjects() error being thrown? -
i coding in swift , attempting use findobjects() function parse ios sdk. however, can't seem figure out type of error being thrown parse if function call fails. i'm novice in swift may issue. attempt call function in do->catch block , use try keyword on function call i'm not sure catch. can catch error using _ grab description error. thanks!
p.s. don't want use findobjectsinbackground() method.
do { let object = try query.getfirstobject() // object } catch _ { // print out error description }
in obj-c, assume similar, print out error.userinfo[@"error"] parameter of nserror returned.
Comments
Post a Comment