juancho
02/17/2019, 3:12 PMclass MyException(
val myCustomProp: Boolean
): Throwable()
in iOS with Swift:
} catch let error as MyException {
print("custom value: \(error.myCustomProp)")
} catch let error {
print(error.localizedDescription)
}
but it always go to the latest catchDominaezzz
02/17/2019, 3:28 PMjuancho
02/17/2019, 4:34 PMjuancho
02/17/2019, 4:34 PMjuancho
02/17/2019, 4:43 PMerror
and it said:
Error Domain=KotlinException Code=0 "Empty Body but it's ok." UserInfo={NSLocalizedDescription=Empty Body but it's ok., KotlinException=booking.api.BookingApiClientException: Empty Body but it's ok., KotlinExceptionOrigin=}
I tried KotlinException but doesn’t exists. Also I found there is a KotlinThrowable but it’s not catch neitherjuancho
02/17/2019, 4:43 PMjuancho
02/17/2019, 4:50 PM} catch let error as NSError {
let ke = error.kotlinException as! BookingApiClientException
print("Expected error is: \(ke.isExpectedError) ")
}
Dominaezzz
02/17/2019, 4:51 PMjuancho
02/17/2019, 4:51 PM