public class TargetSystemException extends FlamingockException
This exception provides comprehensive context about target system issues including:
This exception should be used for target system validation failures, missing target systems, configuration errors, and initialization problems.
| Modifier and Type | Class and Description |
|---|---|
static class |
TargetSystemException.FailureType |
| Constructor and Description |
|---|
TargetSystemException(java.lang.String message,
TargetSystemException.FailureType failureType,
java.lang.String requestedTargetSystemId,
java.util.Set<java.lang.String> availableTargetSystems,
boolean strictValidation,
java.lang.String fallbackTargetSystemId,
java.lang.String resolutionSuggestion,
java.lang.Throwable cause)
Creates a new TargetSystemException with comprehensive context.
|
TargetSystemException(java.lang.String message,
TargetSystemException.FailureType failureType,
java.lang.Throwable cause)
Creates a TargetSystemException with minimal context (for backward compatibility).
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAvailableTargetSystems() |
TargetSystemException.FailureType |
getFailureType() |
java.lang.String |
getFallbackTargetSystemId() |
java.lang.String |
getRequestedTargetSystemId() |
java.lang.String |
getResolutionSuggestion() |
static TargetSystemException |
initializationFailed(java.lang.String targetSystemId,
java.lang.Throwable cause)
Factory method for target system initialization failures.
|
boolean |
isStrictValidation() |
static TargetSystemException |
notFound(java.lang.String requestedId,
java.util.Set<java.lang.String> availableIds,
boolean strictValidation)
Factory method for target system not found errors.
|
toFlamingockExceptionpublic TargetSystemException(java.lang.String message,
TargetSystemException.FailureType failureType,
java.lang.String requestedTargetSystemId,
java.util.Set<java.lang.String> availableTargetSystems,
boolean strictValidation,
java.lang.String fallbackTargetSystemId,
java.lang.String resolutionSuggestion,
java.lang.Throwable cause)
message - descriptive error messagefailureType - the specific type of target system failurerequestedTargetSystemId - the target system ID that was requestedavailableTargetSystems - set of available/configured target system IDsstrictValidation - whether strict validation was enabledfallbackTargetSystemId - the fallback target system ID (if applicable)resolutionSuggestion - guidance on how to resolve the issuecause - the underlying exception that caused the failurepublic TargetSystemException(java.lang.String message,
TargetSystemException.FailureType failureType,
java.lang.Throwable cause)
message - descriptive error messagefailureType - the type of target system failurecause - the underlying exceptionpublic static TargetSystemException notFound(java.lang.String requestedId, java.util.Set<java.lang.String> availableIds, boolean strictValidation)
requestedId - the target system ID that wasn't foundavailableIds - the available target system IDsstrictValidation - whether strict validation is enabledpublic static TargetSystemException initializationFailed(java.lang.String targetSystemId, java.lang.Throwable cause)
targetSystemId - the target system that failed to initializecause - the underlying initialization errorpublic TargetSystemException.FailureType getFailureType()
public java.lang.String getRequestedTargetSystemId()
public java.util.Set<java.lang.String> getAvailableTargetSystems()
public boolean isStrictValidation()
public java.lang.String getFallbackTargetSystemId()
public java.lang.String getResolutionSuggestion()