fix(android): return exception message (where it exists) (#687)

Co-authored-by: エリス <erisu@users.noreply.github.com>
Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
This commit is contained in:
Dave Alden 2021-08-11 08:56:42 +01:00 committed by GitHub
parent c7971d9f63
commit e9db20e381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -762,7 +762,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
} catch (Exception e) {
e.printStackTrace();
this.failPicture("Error retrieving image.");
this.failPicture("Error retrieving image: "+e.getLocalizedMessage());
}
} else {
this.callbackContext.success(finalLocation);
@ -844,7 +844,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
}
} catch (IOException e) {
e.printStackTrace();
this.failPicture("Error capturing image.");
this.failPicture("Error capturing image: "+e.getLocalizedMessage());
}
}
@ -1277,7 +1277,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
code = null;
}
} catch (Exception e) {
this.failPicture("Error compressing image.");
this.failPicture("Error compressing image: "+e.getLocalizedMessage());
}
jpeg_data = null;
}