Skip to main content
Version: 5.1.0 (Unmaintained)

Exception Reference

Paramixel defines seven exception types in org.paramixel.api.exception. Three are used by test authors to control action outcomes; four are thrown by the framework to signal configuration, discovery, or runtime problems.

Action outcome exceptions​

These exceptions are thrown deliberately inside action callbacks to control the recorded outcome.

FailException​

Signals that an action should be marked as failed. Distinct from an uncaught runtime exception — this is a deliberate, author-initiated failure.

import org.paramixel.api.exception.FailException;
Constructor / MethodDescription
new FailException(String message)Creates with a message
FailException.fail()Throws with default message "failed"
FailException.fail(String message)Throws with a custom message
if (result.isEmpty()) {
FailException.fail("expected non-empty result");
}

SkipException​

Signals that an action should be marked as skipped. The runtime records the action as skipped and continues execution of remaining actions.

import org.paramixel.api.exception.SkipException;
Constructor / MethodDescription
new SkipException(String message)Creates with a message
SkipException.skip()Throws with default message "skipped"
SkipException.skip(String message)Throws with a custom message
if (!isEnvironmentAvailable()) {
SkipException.skip("environment not available");
}

AbortedException​

Signals that an action should be marked as aborted due to a precondition or assumption failure. Distinct from a skip — the action could not run due to an unmet condition.

import org.paramixel.api.exception.AbortedException;
Constructor / MethodDescription
new AbortedException(String message)Creates with a message
AbortedException.abort()Throws with default message "aborted"
AbortedException.abort(String message)Throws with a custom message
if (!preconditionMet()) {
AbortedException.abort("precondition not met");
}

Outcome mapping​

When thrown inside an action, the runtime maps these exceptions to the corresponding Status:

ExceptionStatus
FailExceptionFAILED
SkipExceptionSKIPPED
AbortedExceptionABORTED
Any other ThrowableFAILED

Framework exceptions​

These exceptions are thrown by the framework and indicate configuration, discovery, or runtime problems.

ConfigurationException​

Signals that configuration is invalid, inconsistent, or cannot be loaded. Halts startup.

import org.paramixel.api.exception.ConfigurationException;
ConstructorDescription
new ConfigurationException(String message)Creates with a message
new ConfigurationException(String message, Throwable cause)Creates with a message and cause

CycleDetectedException​

Signals that the action hierarchy contains a cyclic parent-child relationship. Halts the test run before any actions execute.

import org.paramixel.api.exception.CycleDetectedException;
ConstructorDescription
new CycleDetectedException(String message)Creates with a message

ResolverException​

Signals that action discovery or factory resolution failed during classpath scanning. Halts startup.

import org.paramixel.api.exception.ResolverException;
ConstructorDescription
new ResolverException(String message)Creates with a message
new ResolverException(String message, Throwable cause)Creates with a message and cause

PolicyException​

Signals that a Retry.Policy computation failed. The Retry loop catches this exception and treats the failed computation as zero, allowing the retry sequence to continue. Custom Policy implementations should throw PolicyException rather than unrelated RuntimeException subtypes.

import org.paramixel.api.exception.PolicyException;
ConstructorDescription
new PolicyException(String message)Creates with a message
new PolicyException(String message, Throwable cause)Creates with a message and cause

Summary​

ExceptionPackageAuthor-initiatedRuntime-thrown
FailExceptionorg.paramixel.api.exceptionYesNo
SkipExceptionorg.paramixel.api.exceptionYesNo
AbortedExceptionorg.paramixel.api.exceptionYesNo
ConfigurationExceptionorg.paramixel.api.exceptionNoYes
CycleDetectedExceptionorg.paramixel.api.exceptionNoYes
ResolverExceptionorg.paramixel.api.exceptionNoYes
PolicyExceptionorg.paramixel.api.exceptionNoYes