mirror of
https://github.com/lightbend/config.git
synced 2025-03-18 13:20:23 +08:00
add some more javadoc to ConfigException.java
This commit is contained in:
parent
4896b7d75d
commit
9f9b351f0e
@ -152,6 +152,11 @@ public class ConfigException extends RuntimeException {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception indicating that a path expression was invalid. Try putting
|
||||
* double quotes around path elements that contain "special" characters.
|
||||
*
|
||||
*/
|
||||
public static class BadPath extends ConfigException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -267,6 +272,11 @@ public class ConfigException extends RuntimeException {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a problem that occurred in {@link Config#checkValid}. A
|
||||
* {@link ConfigException.ValidationFailed} exception thrown from
|
||||
* <code>checkValid()</code> includes a list of problems encountered.
|
||||
*/
|
||||
public static class ValidationProblem {
|
||||
|
||||
final private String path;
|
||||
@ -279,19 +289,31 @@ public class ConfigException extends RuntimeException {
|
||||
this.problem = problem;
|
||||
}
|
||||
|
||||
/** Returns the config setting causing the problem. */
|
||||
public String path() {
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns where the problem occurred (origin may include info on the
|
||||
* file, line number, etc.).
|
||||
*/
|
||||
public ConfigOrigin origin() {
|
||||
return origin;
|
||||
}
|
||||
|
||||
/** Returns a description of the problem. */
|
||||
public String problem() {
|
||||
return problem;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception indicating that {@link Config#checkValid} found validity
|
||||
* problems. The problems are available via the {@link #problems()} method.
|
||||
* The <code>getMessage()</code> of this exception is a potentially very
|
||||
* long string listing all the problems found.
|
||||
*/
|
||||
public static class ValidationFailed extends ConfigException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user