convertFromPlatformException function
Converting a platform exception to a generic CaptureException.
Implementation
CaptureException convertFromPlatformException(
dynamic exception, String? method, String? type) {
int code = 0;
String message = 'No Message';
if (exception is PlatformException) {
code = int.parse(exception.code);
message = exception.message ?? message;
}
return CaptureException(code, message, method, type);
}