10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.exception.ExceptionBuilder Class Reference

Detailed Description

Base class for providing an easy to read and handle exception creation.

Utilizes the following exceptions with the correct error codes during creation.

Static Public Member Functions

static SdkException internalError (final String message)
 Creates an exception representing an internal error and passes the given message to it.
 
static SdkException internalError (final String message, final Throwable cause)
 Creates an exception representing an internal error and passes the given message and cause to it.
 
static SdkException badArguments (final String message, final Throwable cause)
 Creates an exception representing a bad arguments error and passes the given message and cause to it.
 
static SdkException internalTimeoutError (final String message)
 Creates an exception representing a timeout error and passes the given message to it.
 
static SdkException internalTimeoutError (final String message, final Throwable cause)
 Creates an exception representing a timeout error and passes the given message and cause to it.
 
static TokenException invalidJwtToken ()
 Builds an exception to indicate that the JWT is invalid.
 
static TokenException invalidJwtToken (final String message, final Throwable cause)
 Builds an exception to indicate that the JWT is invalid and passes the given message and cause to it.
 
static TokenException invalidJwtHeader ()
 Builds an exception to indicate that the header of the JWT is invalid.
 
static TokenException invalidJwtHeader (final String message, final Throwable cause)
 Builds an exception to indicate that the header of the JWT is invalid and passes the given message and cause to it.
 
static TokenException invalidJwtPayload ()
 Builds an exception to indicate that the payload of the JWT is invalid.
 
static TokenException invalidJwtSignature ()
 Builds an exception to indicate that the signature of the JWT is invalid.
 
static TokenException notActiveJwtToken ()
 Builds an exception to indicate that the JWT is not active.
 
static TokenException invalidJwtAlgorithm ()
 Builds an exception to indicate that the algorithm of the JWT is invalid.
 
static TokenException invalidJwtAudience ()
 Builds an exception to indicate that the audience of the JWT is invalid.
 
static TokenException invalidJwtIssuer ()
 Builds an exception to indicate that the issuer of the JWT is invalid.
 
static TokenException invalidJwtIssuedAt ()
 Builds an exception to indicate that the issued at claim of the JWT is invalid.
 
static TokenException invalidJwtId ()
 Builds an exception to indicate that the id of the JWT is invalid.
 
static TokenException missingRequiredJwtClaim ()
 Builds an exception to indicate that the JWT is missing a required claim.
 
static TokenException missingRequiredJwtClaim (final String message, final Throwable cause)
 Builds an exception to indicate that the JWT is missing a required claim.
 
static TokenException missingJwtSigningKey ()
 Builds an exception to indicate that the signing key of the JWT is missing.
 
static TokenException missingJwtSigningKey (final String message, final Throwable cause)
 Builds an exception to indicate that the signing key of the JWT is missing.
 
static TokenException missingJwtVerificationKey ()
 Builds an exception to indicate that the verification key of the JWT is missing.
 
static TokenException missingJwtVerificationKey (final String message, final Throwable cause)
 Builds an exception to indicate that the verification key of the JWT is missing.
 
static ConfigException missingConfig (final String message)
 Builds an exception to indicate that the configuration is missing.
 
static ConfigException invalidConfig (final String message)
 Builds an exception to indicate that the configuration is invalid.
 
static UserAuthRequiredException userAuthenticationRequired (final String message)
 Builds an exception to indicate that user authentication is required before retrying the same action that caused the exception.
 
static UserAuthRequiredException userAuthenticationRequired (final String message, final Throwable cause)
 Builds an exception that indicates user authentication is required to perform an action.
 

Member Function Documentation

◆ badArguments()

static SdkException tenduke.sdk.core.exception.ExceptionBuilder.badArguments ( final String message,
final Throwable cause )
static

Creates an exception representing a bad arguments error and passes the given message and cause to it.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception representing a bad argument error.

◆ internalError() [1/2]

static SdkException tenduke.sdk.core.exception.ExceptionBuilder.internalError ( final String message)
static

Creates an exception representing an internal error and passes the given message to it.

Parameters
messagedetailed message of the error.
Returns
an exception representing an internal error.

◆ internalError() [2/2]

static SdkException tenduke.sdk.core.exception.ExceptionBuilder.internalError ( final String message,
final Throwable cause )
static

Creates an exception representing an internal error and passes the given message and cause to it.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception representing an internal error.

◆ internalTimeoutError() [1/2]

static SdkException tenduke.sdk.core.exception.ExceptionBuilder.internalTimeoutError ( final String message)
static

Creates an exception representing a timeout error and passes the given message to it.

Parameters
messagedetailed message of the error.
Returns
an exception representing a timeout error.

◆ internalTimeoutError() [2/2]

static SdkException tenduke.sdk.core.exception.ExceptionBuilder.internalTimeoutError ( final String message,
final Throwable cause )
static

Creates an exception representing a timeout error and passes the given message and cause to it.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception representing a timeout error.

◆ invalidConfig()

static ConfigException tenduke.sdk.core.exception.ExceptionBuilder.invalidConfig ( final String message)
static

Builds an exception to indicate that the configuration is invalid.

Parameters
messagedetailed message of the error.
Returns
an exception indicating that the configuration is invalid.

◆ invalidJwtAlgorithm()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtAlgorithm ( )
static

Builds an exception to indicate that the algorithm of the JWT is invalid.

Returns
an exception indicating that the token algorithm is invalid.

◆ invalidJwtAudience()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtAudience ( )
static

Builds an exception to indicate that the audience of the JWT is invalid.

Returns
an exception indicating that the token audience is invalid.

◆ invalidJwtHeader() [1/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtHeader ( )
static

Builds an exception to indicate that the header of the JWT is invalid.

Returns
an exception indicating that the token header is invalid.

◆ invalidJwtHeader() [2/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtHeader ( final String message,
final Throwable cause )
static

Builds an exception to indicate that the header of the JWT is invalid and passes the given message and cause to it.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception indicating that the token header is invalid.

◆ invalidJwtId()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtId ( )
static

Builds an exception to indicate that the id of the JWT is invalid.

Returns
an exception indicating that the token id is invalid.

◆ invalidJwtIssuedAt()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtIssuedAt ( )
static

Builds an exception to indicate that the issued at claim of the JWT is invalid.

Returns
an exception indicating that the token contains an invalid issued at claim.

◆ invalidJwtIssuer()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtIssuer ( )
static

Builds an exception to indicate that the issuer of the JWT is invalid.

Returns
an exception indicating that the token issuer is invalid.

◆ invalidJwtPayload()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtPayload ( )
static

Builds an exception to indicate that the payload of the JWT is invalid.

Returns
an exception indicating that the token payload is invalid.

◆ invalidJwtSignature()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtSignature ( )
static

Builds an exception to indicate that the signature of the JWT is invalid.

Returns
an exception indicating that the token signature is invalid.

◆ invalidJwtToken() [1/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtToken ( )
static

Builds an exception to indicate that the JWT is invalid.

Returns
an exception indicating that the token is invalid.

◆ invalidJwtToken() [2/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.invalidJwtToken ( final String message,
final Throwable cause )
static

Builds an exception to indicate that the JWT is invalid and passes the given message and cause to it.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception indicating that the token is invalid.

◆ missingConfig()

static ConfigException tenduke.sdk.core.exception.ExceptionBuilder.missingConfig ( final String message)
static

Builds an exception to indicate that the configuration is missing.

Parameters
messagedetailed message of the error.
Returns
an exception indicating that the configuration is missing.

◆ missingJwtSigningKey() [1/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingJwtSigningKey ( )
static

Builds an exception to indicate that the signing key of the JWT is missing.

Returns
an exception indicating that the signing key is missing.

◆ missingJwtSigningKey() [2/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingJwtSigningKey ( final String message,
final Throwable cause )
static

Builds an exception to indicate that the signing key of the JWT is missing.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception indicating that the signing key is missing.

◆ missingJwtVerificationKey() [1/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingJwtVerificationKey ( )
static

Builds an exception to indicate that the verification key of the JWT is missing.

Returns
an exception indicating that the verification key is missing.

◆ missingJwtVerificationKey() [2/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingJwtVerificationKey ( final String message,
final Throwable cause )
static

Builds an exception to indicate that the verification key of the JWT is missing.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception indicating that the verification key is missing.

◆ missingRequiredJwtClaim() [1/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingRequiredJwtClaim ( )
static

Builds an exception to indicate that the JWT is missing a required claim.

Returns
an exception indicating that the token is missing a required claim.

◆ missingRequiredJwtClaim() [2/2]

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.missingRequiredJwtClaim ( final String message,
final Throwable cause )
static

Builds an exception to indicate that the JWT is missing a required claim.

Parameters
messagedetailed message of the error.
causenested cause.
Returns
an exception indicating that the token is missing a required claim.

◆ notActiveJwtToken()

static TokenException tenduke.sdk.core.exception.ExceptionBuilder.notActiveJwtToken ( )
static

Builds an exception to indicate that the JWT is not active.

Returns
an exception indicating that the token is not active.

◆ userAuthenticationRequired() [1/2]

static UserAuthRequiredException tenduke.sdk.core.exception.ExceptionBuilder.userAuthenticationRequired ( final String message)
static

Builds an exception to indicate that user authentication is required before retrying the same action that caused the exception.

Parameters
messagedetailed message of the error.
Returns
an exception indicating that user authentication is required.

◆ userAuthenticationRequired() [2/2]

static UserAuthRequiredException tenduke.sdk.core.exception.ExceptionBuilder.userAuthenticationRequired ( final String message,
final Throwable cause )
static

Builds an exception that indicates user authentication is required to perform an action.

Parameters
messagedetailed message of the error.
causeAn underlying cause that triggers need for re-authenticating the user.
Returns
an exception indicating that user authentication is required.

The documentation for this class was generated from the following file: