make "unresolved subst" exception suggest calling resolve()

this way it's clear what the problem is.
This commit is contained in:
Havoc Pennington 2011-11-19 15:02:12 -05:00
parent bb43762608
commit 0684ffbea1

View File

@ -45,14 +45,15 @@ final class ConfigSubstitution extends AbstractConfigValue implements
@Override @Override
public ConfigValueType valueType() { public ConfigValueType valueType() {
throw new ConfigException.NotResolved( throw new ConfigException.NotResolved(
"tried to get value type on an unresolved substitution: " "need to call resolve() on root config; tried to get value type on an unresolved substitution: "
+ this); + this);
} }
@Override @Override
public Object unwrapped() { public Object unwrapped() {
throw new ConfigException.NotResolved( throw new ConfigException.NotResolved(
"tried to unwrap an unresolved substitution: " + this); "need to call resolve() on root config; tried to unwrap an unresolved substitution: "
+ this);
} }
@Override @Override