convertFromPlatformException function
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);
}