Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error messages #3

Open
wants to merge 2 commits into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -199,7 +199,7 @@ public Image(byte[] binary, String format) throws IOException {
if (eng().getStringUtil().isEmpty(format)) format = ImageUtil.getFormat(binary, null);
this.format = format;
_image = ImageUtil.toBufferedImage(binary, format);
if (_image == null) throw new IOException("can not read in image");
if (_image == null) throw new IOException("Unable to read binary image file");
}

public Image(Resource res) throws IOException {
@@ -212,7 +212,7 @@ public Image(Resource res, String format) throws IOException {

_image = ImageUtil.toBufferedImage(res, format);
this.source = res;
if (_image == null) throw new IOException("can not read in file " + res);
if (_image == null) throw new IOException("Unable to read image file [" + res +"]");
}

public Image(BufferedImage image) {
@@ -236,7 +236,7 @@ public Image(String b64str, String format) throws IOException {
if (eng().getStringUtil().isEmpty(format)) format = ImageUtil.getFormat(binary, null);
this.format = format;
_image = ImageUtil.toBufferedImage(binary, format);
if (_image == null) throw new IOException("can not read in image");
if (_image == null) throw new IOException("Unable to decode image from base64 string");
}

public Image(int width, int height, int imageType, Color canvasColor) throws PageException {
@@ -2045,4 +2045,4 @@ private static CFMLEngine eng() {
return _eng;
}

}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.