transformDeviceException function
Transforms exceptions related to the Devices API.
Implementation
Exception transformDeviceException(PlatformException e) {
final parsedException = castAndReturnPlatformException(e);
// Translate Android error to common exception.
if (parsedException is ResourceNotFoundException) {
return DeviceNotTrackedException(
recoverySuggestion: parsedException.recoverySuggestion,
underlyingException: parsedException.underlyingException,
);
}
return parsedException;
}