Added exception for when the gnome shell extension.js file is not found

This commit is contained in:
nathan 2016-10-12 20:38:08 +02:00
parent 313ad5a127
commit 2f96eb21d9

View File

@ -166,6 +166,10 @@ class GnomeShellExtension {
reader = GnomeShellExtension.class.getResourceAsStream("extension.js");
fileOutputStream = new FileOutputStream(extensionFile);
if (reader == null) {
throw new RuntimeException("The GnomeShell extension.js file cannot be found. Something is severely wrong.");
}
IO.copyStream(reader, fileOutputStream);
} finally {
IO.close(reader, logger);