Enum BioApiErrorConstant
- java.lang.Object
-
- java.lang.Enum<BioApiErrorConstant>
-
- io.mosip.kernel.core.bioapi.constant.BioApiErrorConstant
-
- All Implemented Interfaces:
Serializable,Comparable<BioApiErrorConstant>
public enum BioApiErrorConstant extends Enum<BioApiErrorConstant>
Enum containing custom error codes and the respective messages.- Author:
- Manoj SP
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INVALID_INPUT_PARAMETERThrown when data provided as input is invalid.MATCHING_FAILEDThrown when data provided is valid but matching cannot be performed.MISSING_INPUT_PARAMETERThrown when data required as input is missing.QUALITY_CHECK_FAILEDThrown when data provided is valid but quality check cannot be performed.UNKNOWN_ERRORThrown when some other error occurred.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetErrorCode()Gets the error code.StringgetMessage()Gets the message.static BioApiErrorConstantvalueOf(String name)Returns the enum constant of this type with the specified name.static BioApiErrorConstant[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INVALID_INPUT_PARAMETER
public static final BioApiErrorConstant INVALID_INPUT_PARAMETER
Thrown when data provided as input is invalid.
-
MISSING_INPUT_PARAMETER
public static final BioApiErrorConstant MISSING_INPUT_PARAMETER
Thrown when data required as input is missing.
-
QUALITY_CHECK_FAILED
public static final BioApiErrorConstant QUALITY_CHECK_FAILED
Thrown when data provided is valid but quality check cannot be performed.
-
MATCHING_FAILED
public static final BioApiErrorConstant MATCHING_FAILED
Thrown when data provided is valid but matching cannot be performed.
-
UNKNOWN_ERROR
public static final BioApiErrorConstant UNKNOWN_ERROR
Thrown when some other error occurred.
-
-
Method Detail
-
values
public static BioApiErrorConstant[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BioApiErrorConstant c : BioApiErrorConstant.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BioApiErrorConstant valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getErrorCode
public String getErrorCode()
Gets the error code.- Returns:
- the error code
-
getMessage
public String getMessage()
Gets the message.- Returns:
- the message
-
-