public class FailureCause extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_MESSAGE_LABEL_1 |
static String |
ERROR_MESSAGE_LABEL_2 |
| Constructor and Description |
|---|
FailureCause() |
FailureCause(String errorType,
String message,
StackTraceElement[] stackTrace) |
FailureCause(Throwable cause) |
FailureCause(Throwable cause,
StackTraceElement[] stackTrace) |
FailureCause(Throwable cause,
String exceptionClassName,
String message,
StackTraceElement[] stackTrace) |
| Modifier and Type | Method and Description |
|---|---|
Error |
asAssertionError() |
RuntimeException |
asCompromisedException() |
Error |
asError() |
Throwable |
asException() |
SerenityManagedException |
asFailure() |
RuntimeException |
asRuntimeException() |
String |
asString() |
Class<? extends Throwable> |
exceptionClass() |
String |
getErrorType() |
String |
getMessage() |
Throwable |
getOriginalCause() |
Optional<FailureCause> |
getRootCause() |
String |
getShortenedMessage() |
String |
getSimpleErrorType() |
StackTraceElement[] |
getStackTrace() |
boolean |
isAnAssertionError() |
boolean |
isAnError() |
boolean |
isCompromised() |
void |
setStackTrace(StackTraceElement[] stackTrace) |
Throwable |
toException() |
String |
toString() |
public static final String ERROR_MESSAGE_LABEL_1
public static final String ERROR_MESSAGE_LABEL_2
public FailureCause()
public FailureCause(Throwable cause)
public FailureCause(Throwable cause, StackTraceElement[] stackTrace)
public FailureCause(Throwable cause, String exceptionClassName, String message, StackTraceElement[] stackTrace)
public FailureCause(String errorType, String message, StackTraceElement[] stackTrace)
public String getErrorType()
public Optional<FailureCause> getRootCause()
public Throwable getOriginalCause()
public String getSimpleErrorType()
public String getMessage()
public String asString()
public StackTraceElement[] getStackTrace()
public void setStackTrace(StackTraceElement[] stackTrace)
public Throwable toException()
public String getShortenedMessage()
public boolean isAnError()
public boolean isCompromised()
public boolean isAnAssertionError()
public Throwable asException()
public RuntimeException asRuntimeException()
public SerenityManagedException asFailure()
public Error asAssertionError()
public Error asError()
public RuntimeException asCompromisedException()
Copyright © 2023. All rights reserved.