Hi Guys I have this block, this works for most faults (like incorrect passwords, null usernames etc etc) However I was testing logging in with no connection (actually I put it in Flight mode) and it crashes the app with Could not cast value of type ‘NSException’ (0x1f8cfe0b0) to 'Fault’
I want to get the fault code, intercept it with a custom message.
Can you help with the following code block to get the fault if no connection?
Types.tryblock({ () -> Void in
let user = self.backendless?.userService.login(email, password: password)
},
catchblock: { (exception) -> Void in
let myFault = exception as! Fault
})
Many thanks,
Mike