SSE4E

Home

GPError
GPSystem
ByteString
ByteBuffer
TLV
TLVList
Card
Atr
Key
Crypto
Application GPApplication GPSecDomain

ASN1
CardFile
IsoSecureChannel
ApplFactory
GPXML
JsScript
CardSim

X509
CRL
KeyStore
CMSSignedData
CMSGenerator
XMLSignature
OCSPQuery
LDAP
SOAP
URLConnection

PKCS11Provider
PKCS11Session
PKCS11Object

OutlineNode

OpenSCDP

GPError - Reference Documentation

Exception class thrown by various GP functions

Index of Methods

Constants

TypeNameDescription
NumberACCESS_DENIEDAccess to resource denied
NumberARGUMENTS_MISSINGA required argument is missing from the argument list
NumberCARD_COMM_ERRORCard communication error
NumberCARD_INVALID_SWA SW1/SW2 returned by the ICC is not as expected
NumberCRYPTO_FAILEDCryptographic operation failed
NumberDATA_TOO_LARGEData supplied is too large for operation
NumberDEVICE_ERRORHardware device reported error
NumberINVALID_ARGUMENTSToo many arguments supplied in argument list
NumberINVALID_DATAInvalid data supplied as argument
NumberINVALID_ENCODINGInvalid encoding format used in argument
NumberINVALID_INDEXIndex is out of bounds
NumberINVALID_KEYInvalid key for operation
NumberINVALID_LENGTHLength is out of range
NumberINVALID_MECHInvalid mechanism specified
NumberINVALID_TAGInvalid tag value or format
NumberINVALID_TYPEInvalid type given as argument
NumberINVALID_USAGEInvalid usage
NumberKEY_NOT_FOUNDKey not found
NumberOBJECTCREATION- FAILEDObject could not be created
NumberSECURE_CHANNEL_ WRONG_STATESecure channel is in wrong state for desired operation
NumberTAG_ALREADY_EXISTSTag does already exist in TLVList that must contain unique tags
NumberTAG_NOT_FOUNDTag not found
NumberOBJECT_NOT_FOUNDObject could not be found
NumberUNDEFINEDUndefined error code
NumberUNSUPPORTEDUnsupported operation
NumberUSER_DEFINEDUser defined error

Properties

TypeNameDescription
StringclassNameClass throwing the exception
NumbererrorError code. Must be one of the defined constants
NumberreasonReason for exception, e.g. the argument causing the exception
StringmessageHuman readable message describing the error
StringfileNameThe name of the file containing the source code
NumberlineNumberThe line in the source code where the exception occurred

Constructor

Prototype

GPError(String className, Number error, Number reason, String message)

Description

Create a new GPError object with the fields set to the arguments.

Arguments

TypeNameDescription
StringclassNameClass throwing the exception
NumbererrorError code. Must be one of the defined constants
NumberreasonReason for exception, e.g. the argument causing the exception
StringmessageHuman readable message describing the error

Exceptions

NameValueDescription

Example


// Throw from within script
try	{
	throw new GPError("test.class", 1, 2, "script");
	assert(false);
}

catch(e) {
	assert(e instanceof GPError);
	assert(e.className == "test.class");
	assert(e.error == 1);
	assert(e.reason == 2);
	assert(e.message == "script");
	print(e.fileName);
	print(e.lineNumber);
}