Class PackagerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jdk.jpackage.internal.model.PackagerException
- All Implemented Interfaces:
Serializable
Signals that error has occurred at packaging phase.
The preferred way to construct instances of this class is to use
LocalizedExceptionBuilder.buildLocalizedException(StringBundle)
methods
StringBundle i18n = getStringBundle(); // Some way to obtain a string bundle with localized messages
throw buildLocalizedException(i18n).message("error.no.name").create();
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPackagerException
(String key) PackagerException
(String key, Object... arguments) PackagerException
(String key, Throwable cause) PackagerException
(Throwable cause) PackagerException
(Throwable cause, String key, Object... arguments) -
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeException
Throws the cause of the givenRuntimeException
exception asPackagerException
if the cause is of this type or re-throws the givenRuntimeException
exception as-is otherwise.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PackagerException
-
PackagerException
-
PackagerException
-
PackagerException
-
PackagerException
-
-
Method Details
-
rethrowPackagerException
public static RuntimeException rethrowPackagerException(RuntimeException ex) throws PackagerException Throws the cause of the givenRuntimeException
exception asPackagerException
if the cause is of this type or re-throws the givenRuntimeException
exception as-is otherwise.Never return a value. It always throws some exception object.
- Parameters:
ex
- exception to re-throw- Returns:
- doesn't return value
- Throws:
PackagerException
-