Added exception for when the gnome shell extension.js file is not found
This commit is contained in:
parent
313ad5a127
commit
2f96eb21d9
@ -166,6 +166,10 @@ class GnomeShellExtension {
|
|||||||
reader = GnomeShellExtension.class.getResourceAsStream("extension.js");
|
reader = GnomeShellExtension.class.getResourceAsStream("extension.js");
|
||||||
fileOutputStream = new FileOutputStream(extensionFile);
|
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);
|
IO.copyStream(reader, fileOutputStream);
|
||||||
} finally {
|
} finally {
|
||||||
IO.close(reader, logger);
|
IO.close(reader, logger);
|
||||||
|
Loading…
Reference in New Issue
Block a user