Class ExampleFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
co.ankatech.ankasecure.sdk.examples.ExampleFailedException
- All Implemented Interfaces:
Serializable
Signals that an example scenario could not complete.
Thrown by ExampleUtil.fatal(String, Throwable) after the
human-readable diagnosis has already been written to stderr. The
exception exists so that a scenario failure is a value the caller can act
on:
- run standalone, it propagates out of
main, so the JVM still terminates with a non-zero exit code; - run inside
ExampleComplete, the suite records the failure and proceeds with the remaining scenarios.
Neither a stack trace nor the underlying cause is attached. This is
deliberate and preserves the verbosity contract the examples already had:
fatal prints the human-readable diagnosis itself, and the full trace
of the cause is printed only when -Dankasecure.debugStack=true is
set. Attaching the cause here would make the default JVM handler dump that
trace on every standalone failure, defeating the flag.
- Since:
- 3.0.0
- Author:
- ANKATech Solutions Inc.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExampleFailedException(String message) Creates a new instance with no cause, no stack trace and no suppression. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExampleFailedException
Creates a new instance with no cause, no stack trace and no suppression.- Parameters:
message- the diagnosis already reported tostderr
-