Add messages to exceptions

This commit is contained in:
Astrash
2023-11-28 10:36:30 +11:00
parent 1ab3233cba
commit c0aaf6c6e8
3 changed files with 5 additions and 5 deletions

View File

@@ -45,11 +45,11 @@ public class YamlAddon implements AddonInitializer {
try {
event.register(key, new YamlConfiguration(Files.newInputStream(value), key));
} catch(IOException e) {
throw new RuntimeException(e);
throw new RuntimeException("Failed to load config " + key, e);
}
});
} catch(IOException e) {
throw new RuntimeException(e);
throw new RuntimeException("Error occurred while reading config pack files", e);
}
})
.failThrough();