doc / ch.tutteli.atrium.reporting / AtriumError

AtriumError

expect class AtriumError : AssertionError (source)

Indicates that an assertion made by Atrium failed.

Its stack trace (stackTrace in JVM, stack in JS) might be filtered so that reporting does not include all stack frames. This depends on the chosen AtriumErrorAdjuster - so theoretically more than the stack trace could be adjusted or nothing at all.

To create such an error you need to use the Companion.create function.

Properties

message

val message: String?

Usually the error message but an empty string in case of certain test-runners.

Functions

getLocalizedMessage

fun getLocalizedMessage(): String?

Returns super.message in order to be not affected by the hack implemented in message

toString

fun toString(): String

Returns first getLocalizedMessage and then the qualified name of this exception.

Companion Object Functions

create

fun create(message: String, atriumErrorAdjuster: AtriumErrorAdjuster): AtriumError

Creates an AtriumError and adjusts it with the given atriumErrorAdjuster before it is returned.