mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 05:40:16 +00:00
warn about nonexistent classpath resources
This commit is contained in:
@@ -291,6 +291,10 @@ public abstract class AbstractPlatform implements Platform {
|
||||
logger.debug("Copying resource {}", resourcePath);
|
||||
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
||||
OutputStream os = new FileOutputStream(resource)) {
|
||||
if(is == null) {
|
||||
logger.error("Resource {} doesn't exist on the classpath!", resourcePath);
|
||||
return;
|
||||
}
|
||||
IOUtils.copy(is, os);
|
||||
} catch(IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
|
||||
Reference in New Issue
Block a user