Class ConfigException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jdk.jpackage.internal.model.JPackageException
jdk.jpackage.internal.model.ConfigException
- All Implemented Interfaces:
Serializable
Signals that error has occurred at configuration phase.
It contains an error message and an optional advice message on how to correct the error.
The preferred way to construct instances of this class is to use
build(StringBundle), or build(StringBundle, Throwable),
or build(StringBundle, String, Object...) methods.
StringBundle i18n = getStringBundle(); // Some way to obtain a string bundle with localized messages
throw ConfigException.build(i18n)
.message("error.no.name")
.advice("error.no.name.advice")
.create();
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConfigException(String msg, String advice) ConfigException(String msg, String advice, Throwable cause) ConfigException(String msg, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigException.Builderbuild(StringBundle i18n) static ConfigException.Builderbuild(StringBundle i18n, String msgId, Object... args) static ConfigException.Builderbuild(StringBundle i18n, Throwable t) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConfigException
-
ConfigException
-
ConfigException
-
-
Method Details
-
getAdvice
-
build
-
build
-
build
-