lib/qcmd/configuration.rb in qcmd-0.1.13 vs lib/qcmd/configuration.rb in qcmd-0.1.14
- old
+ new
@@ -39,9 +39,12 @@
f.write default
}
end
JSON.load(File.open(config_file))
+ rescue
+ Qcmd.log(:error, "Failed to load configuration, make sure #{ config_file } is valid JSON.\n\n")
+ raise
end
end
def update key, value
config[key] = value