mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
Add messages to exceptions
This commit is contained in:
parent
1ab3233cba
commit
c0aaf6c6e8
@ -45,11 +45,11 @@ public class YamlAddon implements AddonInitializer {
|
|||||||
try {
|
try {
|
||||||
event.register(key, new YamlConfiguration(Files.newInputStream(value), key));
|
event.register(key, new YamlConfiguration(Files.newInputStream(value), key));
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException("Failed to load config " + key, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException("Error occurred while reading config pack files", e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.failThrough();
|
.failThrough();
|
||||||
|
@ -67,12 +67,12 @@ public class SpongeSchematicAddon implements AddonInitializer {
|
|||||||
try {
|
try {
|
||||||
return convert(Files.newInputStream(entry.getValue()), FileUtil.fileName(entry.getKey()));
|
return convert(Files.newInputStream(entry.getValue()), FileUtil.fileName(entry.getKey()));
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException("Failed to load config " + entry.getKey(), e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.forEach(structureRegistry::register);
|
.forEach(structureRegistry::register);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException("Error occurred while reading config pack files", e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.failThrough();
|
.failThrough();
|
||||||
|
@ -60,7 +60,7 @@ public class TerraScriptAddon implements AddonInitializer {
|
|||||||
})
|
})
|
||||||
.forEach(structureRegistry::register);
|
.forEach(structureRegistry::register);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException("Error occurred while reading config pack files", e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.priority(100)
|
.priority(100)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user