@ProviderType
public class KuraRuntimeException
extends java.lang.RuntimeException
KuraRuntimeException
class is the superclass of all runtime exceptions in the Kura project. It extends
the JDK RuntimeException
class by requesting its invokers to provide an error code when building its
instances. The code is one value of KuraErrorCode
; the code is used to document the possible error conditions
generated by the platform as well as to identify the localized exception messages to be reported. Exceptions messages
are stored in the KuraExceptionMessagesBundle
Properties Bundle and they are keyed on the exception code.KuraErrorCode
,
Serialized FormConstructor and Description |
---|
KuraRuntimeException(KuraErrorCode code)
Builds a new
KuraRuntimeException instance based on the supplied KuraErrorCode . |
KuraRuntimeException(KuraErrorCode code,
java.lang.Object... arguments)
Builds a new
KuraRuntimeException instance based on the supplied KuraErrorCode . |
KuraRuntimeException(KuraErrorCode code,
java.lang.Throwable cause,
java.lang.Object... arguments)
Builds a new
KuraRuntimeException instance based on the supplied KuraErrorCode , an optional
Throwable cause, and optional arguments for the associated exception message. |
Modifier and Type | Method and Description |
---|---|
KuraErrorCode |
getCode()
Gets the error code.
|
java.lang.String |
getLocalizedMessage() |
java.lang.String |
getMessage() |
public KuraRuntimeException(KuraErrorCode code)
KuraRuntimeException
instance based on the supplied KuraErrorCode
.code
- the error codepublic KuraRuntimeException(KuraErrorCode code, java.lang.Object... arguments)
KuraRuntimeException
instance based on the supplied KuraErrorCode
.code
- the error codearguments
- the argumentspublic KuraRuntimeException(KuraErrorCode code, java.lang.Throwable cause, java.lang.Object... arguments)
KuraRuntimeException
instance based on the supplied KuraErrorCode
, an optional
Throwable cause, and optional arguments for the associated exception message.code
- the error codecause
- the causearguments
- the argumentspublic KuraErrorCode getCode()
public java.lang.String getLocalizedMessage()
getLocalizedMessage
in class java.lang.Throwable
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable