public class CertPathValidatorException extends GeneralSecurityException
A CertPathValidatorException
may optionally include the certification
path instance that failed the validation and the index of the failed
certificate.
Constructor and Description |
---|
CertPathValidatorException()
Creates a new
CertPathValidatorException . |
CertPathValidatorException(String msg)
Creates a new
CertPathValidatorException with the specified
message. |
CertPathValidatorException(String msg,
Throwable cause)
Creates a new
CertPathValidatorException with the specified
message and cause. |
CertPathValidatorException(String msg,
Throwable cause,
CertPath certPath,
int index)
Creates a new
CertPathValidatorException with the specified
message , cause, certification path and certificate index in the
certification path. |
CertPathValidatorException(Throwable cause)
Creates a new
CertPathValidatorException with the specified
cause. |
Modifier and Type | Method and Description |
---|---|
CertPath |
getCertPath()
Returns the certification path that failed validation.
|
int |
getIndex()
Returns the index of the failed certificate in the certification path.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CertPathValidatorException(String msg, Throwable cause, CertPath certPath, int index)
CertPathValidatorException
with the specified
message , cause, certification path and certificate index in the
certification path.msg
- the detail message for this exception.cause
- the cause.certPath
- the certification path that failed the validation.index
- the index of the failed certificate.IllegalArgumentException
- if certPath
is null
and index is not -1
.IndexOutOfBoundsException
- if certPath
is not null
and index is not
referencing an certificate in the certification path.public CertPathValidatorException(String msg, Throwable cause)
CertPathValidatorException
with the specified
message and cause.msg
- the detail message for this exception.cause
- the cause why the path could not be validated.public CertPathValidatorException(Throwable cause)
CertPathValidatorException
with the specified
cause.cause
- the cause why the path could not be validated.public CertPathValidatorException(String msg)
CertPathValidatorException
with the specified
message.msg
- the detail message for this exception.public CertPathValidatorException()
CertPathValidatorException
.public CertPath getCertPath()
null
if
none was specified.public int getIndex()
-1
if none was specified.