public class PKCS11Exception extends TokenException
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ERROR_CODE_PROPERTIES
The name of the properties file that holds the names of the PKCS#11 error- codes.
|
protected long |
errorCode_
The code of the error which was the reason for this exception.
|
protected static java.util.Properties |
errorCodeNames_
The properties object that holds the mapping from error-code to the name of the PKCS#11 error.
|
protected static boolean |
errorCodeNamesAvailable_
True, if the mapping of error codes to PKCS#11 error names is available.
|
encapsulatedException_
Constructor and Description |
---|
PKCS11Exception(long errorCode)
Constructor taking the error code as defined for the CKR_* constants in PKCS#11.
|
Modifier and Type | Method and Description |
---|---|
long |
getErrorCode()
Returns the PKCS#11 error code.
|
java.lang.String |
getMessage()
This method gets the corresponding text error message from a property file.
|
getEncapsulatedException, toString
protected static final java.lang.String ERROR_CODE_PROPERTIES
protected static java.util.Properties errorCodeNames_
protected static boolean errorCodeNamesAvailable_
protected long errorCode_
public PKCS11Exception(long errorCode)
errorCode
- The PKCS#11 error code (return value).public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public long getErrorCode()
IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9