changed so we use the correct exceptions.
This commit is contained in:
parent
e5777136b1
commit
93177c8604
|
@ -39,6 +39,11 @@
|
|||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class MutableImage {
|
|||
}
|
||||
}
|
||||
|
||||
public void cropToPreview(int orientation, float xPercentage, float yPercentage) throws ImageMutationFailedException {
|
||||
public void cropToPreview(int orientation, float xPercentage, float yPercentage) throws IllegalArgumentException {
|
||||
int width = this.currentRepresentation.getWidth();
|
||||
int height = this.currentRepresentation.getHeight();
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ public class RCTCameraModule extends ReactContextBaseJavaModule
|
|||
int orientation = _reactContext.getResources().getConfiguration().orientation;
|
||||
|
||||
mutableImage.cropToPreview(orientation, paddingWidth, paddingHeight);
|
||||
} catch (MutableImage.ImageMutationFailedException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
promise.reject("Error cropping image to preview", e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue