From e9db20e381e0e60baa14664543271d094f79e91c Mon Sep 17 00:00:00 2001 From: Dave Alden Date: Wed, 11 Aug 2021 08:56:42 +0100 Subject: [PATCH] fix(android): return exception message (where it exists) (#687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: エリス Co-authored-by: jcesarmobile --- src/android/CameraLauncher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java index a2fdb4d59..198c03999 100644 --- a/src/android/CameraLauncher.java +++ b/src/android/CameraLauncher.java @@ -762,7 +762,7 @@ else if (destType == FILE_URI) { } 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 @@ else if (srcType == CAMERA) { } } catch (IOException e) { e.printStackTrace(); - this.failPicture("Error capturing image."); + this.failPicture("Error capturing image: "+e.getLocalizedMessage()); } } @@ -1277,7 +1277,7 @@ public void processPicture(Bitmap bitmap, int encodingType) { code = null; } } catch (Exception e) { - this.failPicture("Error compressing image."); + this.failPicture("Error compressing image: "+e.getLocalizedMessage()); } jpeg_data = null; }