Catch all exceptions for screenshots

This makes the code more reliable.
This commit is contained in:
ipkpjersi 2024-01-06 16:12:04 -05:00
parent 3762aed133
commit 2079ec7459

View file

@ -551,11 +551,11 @@ public final class client extends GameShell {
BufferedImage image = robot.createScreenCapture(captureSize); BufferedImage image = robot.createScreenCapture(captureSize);
File outputFile = new File(outputFolder, filename); File outputFile = new File(outputFolder, filename);
ImageIO.write(image, "png", outputFile); ImageIO.write(image, "png", outputFile);
} catch (IOException e) {
e.printStackTrace();
} catch (AWTException e) { } catch (AWTException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} } catch (Exception e) {
e.printStackTrace();
}
} }