- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- io.github.jopenlibs.vault.VaultException
-
- All Implemented Interfaces:
java.io.Serializable
public class VaultException extends java.lang.Exception
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VaultException(java.lang.String message)
VaultException(java.lang.String message, int httpStatusCode)
Use this constructor to generate aVaultException
instance that is based on receiving a particular HTTP status code from a Vault server (e.g.VaultException(java.lang.Throwable t)
VaultException(java.lang.Throwable t, int httpStatusCode)
Use this constructor to generate aVaultException
instance that is based on receiving a particular HTTP status code from a Vault server (e.g.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHttpStatusCode()
An HTTP status code, returned from a Vault server, that is the cause of thisVaultException
.
-
-
-
Constructor Detail
-
VaultException
public VaultException(java.lang.String message)
-
VaultException
public VaultException(java.lang.Throwable t)
-
VaultException
public VaultException(java.lang.String message, int httpStatusCode)
Use this constructor to generate aVaultException
instance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).- Parameters:
message
- A string expressing the exception causehttpStatusCode
- An HTTP status code returned by a Vault server (e.g. 500)
-
VaultException
public VaultException(java.lang.Throwable t, int httpStatusCode)
Use this constructor to generate aVaultException
instance that is based on receiving a particular HTTP status code from a Vault server (e.g. 500).- Parameters:
t
- Another exception that thisVaultException
will wraphttpStatusCode
- An HTTP status code returned by a Vault server (e.g. 500)
-
-
Method Detail
-
getHttpStatusCode
public int getHttpStatusCode()
An HTTP status code, returned from a Vault server, that is the cause of thisVaultException
. Some exceptions are not caused on the Vault side. Obviously, if there is no relevant HTTP status code then this method will return0
.- Returns:
- An HTTP status code, returned from a Vault server, that is the cause of this
VaultException
-
-