mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
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:
parent
c7971d9f63
commit
e9db20e381
@ -762,7 +762,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
this.failPicture("Error retrieving image.");
|
this.failPicture("Error retrieving image: "+e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.callbackContext.success(finalLocation);
|
this.callbackContext.success(finalLocation);
|
||||||
@ -844,7 +844,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
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;
|
code = null;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.failPicture("Error compressing image.");
|
this.failPicture("Error compressing image: "+e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
jpeg_data = null;
|
jpeg_data = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user