Skip to content

Commit

Permalink
Added improved logging for error conditions while processing images i…
Browse files Browse the repository at this point in the history
…n CSS file.
  • Loading branch information
shannah committed Apr 28, 2020
1 parent 86f4ce0 commit cc5186d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,10 @@ public void createScreenshotCallback(String id, int x, int y, int w, int h) {
Platform.runLater(()->{
//System.out.println("in screenshot callback id "+id);
//System.out.println(imageProcessors);
if (imageProcessors.containsKey(id)) {
if (w == 0 || h == 0) {
System.err.println("Attempt to screenshot element with id "+id+" failed because width or height is zero: w="+w+", h="+h);
}
if (imageProcessors.containsKey(id) && w > 0 && h > 0) {
double ratio = 1.0;
//this.targetDensity = Display.DENSITY_VERY_HIGH;
SnapshotParameters params = new SnapshotParameters();
Expand Down

0 comments on commit cc5186d

Please sign in to comment.