Skip to content

Commit

Permalink
Merge pull request lightbend#550 from sathiyapk/trace-allow-missing
Browse files Browse the repository at this point in the history
Adds trace while allowing missing file by returing empty parse value
  • Loading branch information
havocp authored Mar 2, 2018
2 parents 8f10c40 + 3eedbed commit 4c20fb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/src/main/java/com/typesafe/config/impl/Parseable.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ final private AbstractConfigValue parseValue(ConfigOrigin origin,
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()
Expand Down

0 comments on commit 4c20fb0

Please sign in to comment.