Package com.hexagonkt.core
Class ExceptionsKt
-
- All Implemented Interfaces:
public final class ExceptionsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static BooleanassertEnabledprivate final static Voidfail
-
Method Summary
Modifier and Type Method Description final BooleangetAssertEnabled()This flag is true when assertions are enabled in the JVM ( -eaflag).final VoidgetFail()final static Array<out StackTraceElement>filterStackTrace(Throwable $self, String prefix)Return the stack trace array of the frames that starts with the given prefix. final static StringtoText(Throwable $self, String prefix)Return this throwable as a text. -
-
Method Detail
-
getAssertEnabled
final Boolean getAssertEnabled()
This flag is true when assertions are enabled in the JVM (
-eaflag). Assertions are disabled by default in the JVM, but they are enabled (and should be that way) on the tests.
-
getFail
final Void getFail()
-
filterStackTrace
final static Array<out StackTraceElement> filterStackTrace(Throwable $self, String prefix)
Return the stack trace array of the frames that starts with the given prefix.
- Parameters:
prefix- Prefix used to filter stack trace elements (applied to class names).- Returns:
Array with the frames of the throwable whose classes start with the given prefix.
-
toText
final static String toText(Throwable $self, String prefix)
Return this throwable as a text.
- Parameters:
prefix- Optional prefix to filter stack trace elements.- Returns:
The filtered (if filter is provided) Throwable as a string.
-
-
-
-