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
val causes: List<Throwable>

List of causing exceptions.

Link copied to clipboard
open val message: String?

Functions

Link copied to clipboard
fun addSuppressed(p0: Throwable)
Link copied to clipboard
open fun fillInStackTrace(): Throwable
Link copied to clipboard
fun Throwable.filterStackTrace(prefix: String): Array<out StackTraceElement>

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

Link copied to clipboard
open fun getLocalizedMessage(): String
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)
Link copied to clipboard
fun Throwable.toText(prefix: String = ""): String

Return this throwable as a text.