Adds trace while allowing missing file by returing empty parse value

This commit is contained in:
Sathiya 2018-03-02 17:09:48 +01:00
parent 6ee62071b8
commit aac654503b

View File

@ -180,6 +180,8 @@ public abstract class Parseable implements ConfigParseable {
return rawParseValue(origin, finalOptions); return rawParseValue(origin, finalOptions);
} catch (IOException e) { } catch (IOException e) {
if (finalOptions.getAllowMissing()) { if (finalOptions.getAllowMissing()) {
trace(e.getMessage() + ". Allowing Missing File, this can be turned off by setting" +
" ConfigParseOptions.allowMissing = false");
return SimpleConfigObject.emptyMissing(origin); return SimpleConfigObject.emptyMissing(origin);
} else { } else {
trace("exception loading " + origin.description() + ": " + e.getClass().getName() trace("exception loading " + origin.description() + ": " + e.getClass().getName()