doc / ch.tutteli.atrium.reporting / AtriumErrorAdjuster

AtriumErrorAdjuster

expect interface AtriumErrorAdjuster : AtriumErrorAdjusterCommon (source)

Responsible to adjust a given Throwable (usually an AtriumError) for improved error reporting.

Typically this involves filtering the stack traces (stackTrace in JVM, stack in JS) in some way or another (also the stack trace of the cause or suppressed Throwables).

Functions

adjustStackTrace

abstract fun adjustStackTrace(stackTrace: Sequence<StackTraceElement>): Sequence<StackTraceElement>

Adjusts the given Throwable.stackTrace in some way or another.

Inherited Functions

adjust

abstract fun adjust(throwable: Throwable): Unit

Adjusts the given throwable - typically this involves filtering the stack trace (stackTrace in JVM, stack in JS) in some way or another as well as the stack traces of a Throwable.cause and other stack traces (e.g. stack traces of suppressed throwable in JVM).

adjustOtherThanStacks

abstract fun adjustOtherThanStacks(throwable: Throwable): Unit

Adjusts parts of the given throwable but not its stack trace.

Inheritors

FilterAtriumErrorAdjuster

abstract class FilterAtriumErrorAdjuster : AtriumErrorAdjuster

MultiAtriumErrorAdjuster

expect class MultiAtriumErrorAdjuster : AtriumErrorAdjuster

Represents an AtriumErrorAdjuster which incorporates several AtriumErrorAdjuster and executes one after another during adjustment in the given order.

NoOpAtriumErrorAdjuster

expect object NoOpAtriumErrorAdjuster : AtriumErrorAdjuster

An implementation of an AtriumErrorAdjuster which adjusts nothing.

NoOpAtriumErrorAdjusterCommon

abstract class NoOpAtriumErrorAdjusterCommon : AtriumErrorAdjuster

An implementation of an AtriumErrorAdjuster which adjusts nothing and can be used by the platforms to provide the actual type of NoOpAtriumErrorAdjuster.

RemoveAtriumFromAtriumError

interface RemoveAtriumFromAtriumError : AtriumErrorAdjuster

Responsible to remove the stacktrace of Atrium from an AtriumError.

RemoveRunnerFromAtriumError

interface RemoveRunnerFromAtriumError : AtriumErrorAdjuster

Responsible to remove the stacktrace of the test runner(s) from an AtriumError.