1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* show original IO exception message

This commit is contained in:
Reinhard Pointner 2015-12-06 20:51:06 +00:00
parent 0ac9d7c616
commit b84eaa3947

View File

@ -46,7 +46,7 @@ public class BindingsHandler extends MapOptionHandler {
return pos; return pos;
} }
String n = getIdentifier(nv[0].trim()); String n = getName(nv[0].trim());
String v = getValue(nv[1].trim()); String v = getValue(nv[1].trim());
addToMap(map, n, v); addToMap(map, n, v);
@ -56,7 +56,7 @@ public class BindingsHandler extends MapOptionHandler {
return pos; return pos;
} }
public String getIdentifier(String n) throws CmdLineException { public String getName(String n) throws CmdLineException {
if (!isIdentifier(n)) { if (!isIdentifier(n)) {
throw new CmdLineException(owner, "\"" + n + "\" is not a valid identifier", null); throw new CmdLineException(owner, "\"" + n + "\" is not a valid identifier", null);
} }
@ -69,7 +69,7 @@ public class BindingsHandler extends MapOptionHandler {
try { try {
return readTextFile(f).trim(); return readTextFile(f).trim();
} catch (IOException e) { } catch (IOException e) {
throw new CmdLineException(owner, "\"" + f + "\" is not a text file", e); throw new CmdLineException(owner, e.getMessage(), e);
} }
} }
return v; return v;