Only catch Exceptions not Errors (#1186)

This commit is contained in:
glowredman authored and GitHub committed 2025-12-21 14:14:50 +01:00
1 parent 941fc88484
commit a32f9ca244
20 files changed
+45 -39

No files matched your search

@@ -67,8 +67,8 @@ public class PBRAtlasTexture extends AutoClosableAbstractTexture {
for (TextureAtlasSprite sprite : sprites.values()) {
try {
uploadSprite(sprite);
} catch (Throwable throwable) {
CrashReport crashReport = CrashReport.makeCrashReport(throwable, "Stitching texture atlas");
} catch (Exception e) {
CrashReport crashReport = CrashReport.makeCrashReport(e, "Stitching texture atlas");
CrashReportCategory crashReportCategory = crashReport.makeCategory("Texture being stitched together");
crashReportCategory.addCrashSection("Atlas path", id);
crashReportCategory.addCrashSection("Sprite", sprite);
@@ -97,7 +97,7 @@ public class PBRAtlasTexture extends AutoClosableAbstractTexture {
try {
upload(atlasWidth, atlasHeight, mipLevel, anisotropicFiltering);
return true;
} catch (Throwable t) {
} catch (Exception t) {
Iris.logger.error("Could not upload PBR texture", t);
return false;
}