Class UnhandledConfigResourceIdentifierException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.mchange.v2.cfg.UnhandledConfigResourceIdentifierException
-
- All Implemented Interfaces:
java.io.Serializable
public class UnhandledConfigResourceIdentifierException extends java.lang.RuntimeExceptionNo config source could be found that knows how to read a resource identifier.Distinct from the identifier naming something that is not there, which is ordinary absence: a resource path may legitimately go unsatisfied, and
MConfigskips it. This says something stronger — that nothing in the library, and nothing anyExtraPropertiesConfigSourcesdeclared on the CLASSPATH, recognizes the identifier at all. In practice it usually means a typo, or a jar that was expected to supply a reader and did not.That distinction is the reason this type exists. Reading a list of resource paths records each path's outcome — read, vetoed, not found, or faulted — and an unreadable identifier belongs in the fault bucket rather than among the merely absent. Before this type, such an identifier arrived as a
FileNotFoundExceptionand was filed as absence, so a mistake in a deployment's configuration was reported as the benign case.A
RuntimeExceptionbecause it is a programming or deployment error rather than a condition a caller should be made to handle at every call. It does not escape a read: it is caught per path, recorded against that path, and reported. Code that merely asks about an identifier rather than reading it —ConfigUtils.pointsToVetoableConfig, for instance — catches it and answers in the negative, leaving the complaint to whoever actually performs the read.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnhandledConfigResourceIdentifierException(java.lang.String message)UnhandledConfigResourceIdentifierException(java.lang.String message, java.lang.Throwable cause)
-