Package com.chargebee.v4.exceptions
Class ConfigurationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.chargebee.v4.exceptions.ChargebeeException
com.chargebee.v4.exceptions.ConfigurationException
- All Implemented Interfaces:
Serializable
Exception thrown when there's an issue with SDK configuration.
This extends ChargebeeException to allow fluent builder usage
without requiring try-catch blocks during client setup.
Common causes:
- Missing required configuration (e.g., API key)
- Invalid configuration values
- Malformed URLs
Example:
try {
ChargebeeClient client = ChargebeeClient.builder()
.siteName("my-site")
// Missing apiKey!
.build();
} catch (ConfigurationException e) {
System.err.println("Configuration error: " + e.getMessage());
}
Note: This exception is NOT retryable as it indicates a programming error that must be fixed in the code.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationException(String message) Creates a ConfigurationException with a message.ConfigurationException(String message, Throwable cause) Creates a ConfigurationException with a message and cause. -
Method Summary
Modifier and TypeMethodDescriptionbooleanConfiguration errors are never retryable as they indicate programming errors that must be fixed in the code.toString()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ConfigurationException
Creates a ConfigurationException with a message.- Parameters:
message- descriptive error message
-
ConfigurationException
Creates a ConfigurationException with a message and cause.- Parameters:
message- descriptive error messagecause- the underlying cause
-
-
Method Details
-
isRetryable
public boolean isRetryable()Configuration errors are never retryable as they indicate programming errors that must be fixed in the code.- Overrides:
isRetryablein classChargebeeException- Returns:
- false always
-
toString
-