adaptErrors function
method used to adapt the error from the platform interface
Implementation
Never adaptErrors({
required Object error,
required StackTrace stackTrace,
}) {
if (error is PaymentCancelledByUserExceptionInterface) {
throw PaymentCancelledByUserException();
}
Error.throwWithStackTrace(error, stackTrace);
}