mirror of
https://github.com/lightbend/config.git
synced 2025-01-15 14:50:23 +08:00
Adds trace while allowing missing file by returing empty parse value
This commit is contained in:
parent
6ee62071b8
commit
aac654503b
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user