You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2021/08/11 07:56:47 UTC

[cordova-plugin-camera] branch master updated: fix(android): return exception message (where it exists) (#687)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-camera.git


The following commit(s) were added to refs/heads/master by this push:
     new e9db20e  fix(android): return exception message (where it exists)  (#687)
e9db20e is described below

commit e9db20e381e0e60baa14664543271d094f79e91c
Author: Dave Alden <dp...@gmail.com>
AuthorDate: Wed Aug 11 08:56:42 2021 +0100

    fix(android): return exception message (where it exists)  (#687)
    
    Co-authored-by: エリス <er...@users.noreply.github.com>
    Co-authored-by: jcesarmobile <jc...@gmail.com>
---
 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 a2fdb4d..198c039 100644
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -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;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org