Package org.molgenis.i18n
Class CodedRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.molgenis.i18n.CodedRuntimeException
-
- All Implemented Interfaces:
Serializable,ErrorCoded
- Direct Known Subclasses:
BadRequestException,ForbiddenException
public abstract class CodedRuntimeException extends RuntimeException implements ErrorCoded
RuntimeExceptionwith error code.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCodedRuntimeException(String errorCode)protectedCodedRuntimeException(String errorCode, Throwable cause)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetErrorCode()StringgetLocalizedMessage()protected abstract Object[]getLocalizedMessageArguments()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getErrorCode
public String getErrorCode()
- Specified by:
getErrorCodein interfaceErrorCoded
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classThrowable
-
getLocalizedMessageArguments
protected abstract Object[] getLocalizedMessageArguments()
- Returns:
- the arguments for both the message format and the localized message to use
-
-