Class AbstractCodedMetapathException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- gov.nist.secauto.metaschema.core.metapath.MetapathException
-
- gov.nist.secauto.metaschema.core.metapath.AbstractCodedMetapathException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArithmeticFunctionException
,DateTimeFunctionException
,DocumentFunctionException
,DynamicMetapathException
,InvalidArgumentFunctionException
,InvalidTypeFunctionException
,StaticMetapathException
,TypeMetapathException
,UriFunctionException
public abstract class AbstractCodedMetapathException extends MetapathException
This Metapath exception base class is used for all exceptions that have a defined error code family and value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractCodedMetapathException(int code, String message)
Constructs a new Metapath exception with the providedmessage
and no cause.AbstractCodedMetapathException(int code, String message, Throwable cause)
Constructs a new Metapath exception with the providedmessage
andcause
.AbstractCodedMetapathException(int code, Throwable cause)
Constructs a new Metapath exception with anull
message and the providedcause
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
getCode()
Get the error code value.protected String
getCodeAsString()
Get a combination of the error code family and value.protected abstract String
getCodePrefix()
Get the error code family.String
getMessage()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AbstractCodedMetapathException
public AbstractCodedMetapathException(int code, String message)
Constructs a new Metapath exception with the providedmessage
and no cause.- Parameters:
code
- the error code valuemessage
- the exception message
-
AbstractCodedMetapathException
public AbstractCodedMetapathException(int code, String message, Throwable cause)
Constructs a new Metapath exception with the providedmessage
andcause
.- Parameters:
code
- the error code valuemessage
- the exception messagecause
- the exception cause
-
AbstractCodedMetapathException
public AbstractCodedMetapathException(int code, Throwable cause)
Constructs a new Metapath exception with anull
message and the providedcause
.- Parameters:
code
- the error code valuecause
- the exception cause
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getCode
protected int getCode()
Get the error code value.- Returns:
- the error code value
-
getCodePrefix
protected abstract String getCodePrefix()
Get the error code family.- Returns:
- the error code family
-
getCodeAsString
protected String getCodeAsString()
Get a combination of the error code family and value.- Returns:
- the full error code.
-
-