convertFromPlatformException function

dynamic convertFromPlatformException(
  1. PlatformException exception,
  2. dynamic method,
  3. dynamic type
)

Converting a platform exception to a generic CaptureException.

Implementation

convertFromPlatformException(PlatformException exception, method, type) {
  throw CaptureException(int.parse(exception.code),
      exception.message ?? 'No Message', method, type);
}