Class CodedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.n52.shetland.ogc.ows.exception.OwsExceptionReport
-
- org.n52.shetland.ogc.ows.exception.CodedException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CodedOwsException,CodedSosException,CodedWpsException
public abstract class CodedException extends OwsExceptionReport
- Since:
- 1.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CodedException(ExceptionCode code)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodedExceptionat(Enum<?> locator)CodedExceptionat(String locator)CodedExceptioncausedBy(Throwable exception)ExceptionCodegetCode()List<CodedException>getExceptions()StringgetLocator()StringgetMessage()booleanhasMessage()CodedExceptionwithMessage(String message, Object... args)-
Methods inherited from class org.n52.shetland.ogc.ows.exception.OwsExceptionReport
getNamespace, getStatus, getVersion, hasStatus, setStatus, setVersion
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
CodedException
public CodedException(ExceptionCode code)
-
-
Method Detail
-
getCode
public final ExceptionCode getCode()
-
getLocator
public final String getLocator()
-
getMessage
public final String getMessage()
- Overrides:
getMessagein classOwsExceptionReport
-
hasMessage
public final boolean hasMessage()
-
getExceptions
public final List<CodedException> getExceptions()
- Specified by:
getExceptionsin classOwsExceptionReport- Returns:
- Returns the ExceptionTypes of this exception
-
at
public final CodedException at(String locator)
-
at
public final CodedException at(Enum<?> locator)
-
withMessage
public final CodedException withMessage(String message, Object... args)
- Parameters:
message- the message formatargs- the optional formatting arguments- Returns:
- this
- See Also:
String.format(java.lang.String, java.lang.Object[])
-
causedBy
public final CodedException causedBy(Throwable exception)
-
-