public interface IErrorCode
Provides an error code that identifies the type of message.
Implementations of this interface are expected to be immutable.
-
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Get the error code value.default StringGet a combination of the error code family and value.Get the error code prefix, which indicates what type of error it is.static IErrorCodeCreate a new error code with the provided prefix and code value.
-
Method Details
-
of
Create a new error code with the provided prefix and code value.- Parameters:
prefix- the error code prefixcode- the error code value- Returns:
- a new error code instance
-
getPrefix
Get the error code prefix, which indicates what type of error it is.- Returns:
- the error code prefix
-
getCode
int getCode()Get the error code value.- Returns:
- the error code value
-
getCodeAsString
Get a combination of the error code family and value.- Returns:
- the full error code.
-