Skip to content

Commit e9db20e

Browse files
dpa99cerisujcesarmobile
authored
fix(android): return exception message (where it exists) (#687)
Co-authored-by: エリス <[email protected]> Co-authored-by: jcesarmobile <[email protected]>
1 parent c7971d9 commit e9db20e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/android/CameraLauncher.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ else if (destType == FILE_URI) {
762762

763763
} catch (Exception e) {
764764
e.printStackTrace();
765-
this.failPicture("Error retrieving image.");
765+
this.failPicture("Error retrieving image: "+e.getLocalizedMessage());
766766
}
767767
} else {
768768
this.callbackContext.success(finalLocation);
@@ -844,7 +844,7 @@ else if (srcType == CAMERA) {
844844
}
845845
} catch (IOException e) {
846846
e.printStackTrace();
847-
this.failPicture("Error capturing image.");
847+
this.failPicture("Error capturing image: "+e.getLocalizedMessage());
848848
}
849849
}
850850

@@ -1277,7 +1277,7 @@ public void processPicture(Bitmap bitmap, int encodingType) {
12771277
code = null;
12781278
}
12791279
} catch (Exception e) {
1280-
this.failPicture("Error compressing image.");
1280+
this.failPicture("Error compressing image: "+e.getLocalizedMessage());
12811281
}
12821282
jpeg_data = null;
12831283
}

0 commit comments

Comments
 (0)