Merge pull request #550 from sathiyapk/trace-allow-missing

Adds trace while allowing missing file by returing empty parse value
This commit is contained in:
Havoc Pennington 2018-03-02 12:28:14 -05:00 committed by GitHub
commit b991b3d68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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