MultipleException

class MultipleException(val causes: List<Throwable>, message: String = "") : RuntimeException

Exception with a list of causes. Cause is null as it can't be told which one of the list is the cause.

A coded multiple exception should be created this way:

CodedException(400, "Many errors", MultipleException())

To pass a list of causes

CodedException (500, "Error", *list)

Constructors

Link copied to clipboard
constructor(vararg causes: Throwable)
constructor(message: String, causes: List<Throwable>)
constructor(message: String, vararg causes: Throwable)
constructor(causes: List<Throwable>, message: String = "")

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

List of causing exceptions.

Link copied to clipboard
open val message: String?

Functions

Link copied to clipboard

Return the stack trace array of the frames that starts with the given prefix.

Link copied to clipboard
fun Throwable.toText(prefix: String = ""): String

Return this throwable as a text.