ContextedIllegalStateException

class ContextedIllegalStateException(message: String? = null, cause: Throwable? = null, context: ExceptionContext = DefaultExceptionContext()) : IllegalStateException, ExceptionContext

An IllegalStateException with attached context.

Note: Only use this exception if it is guaranteed that the exception will not be propagated to the user.

See also

Constructors

Link copied to clipboard
constructor(message: String? = null, cause: Throwable? = null, context: ExceptionContext = DefaultExceptionContext())

Properties

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

The context of this if this is an exception with context.

Link copied to clipboard
open val message: String?
Link copied to clipboard

The raw message of this, without the exception context.

Functions

Link copied to clipboard
open override fun addContextValue(p0: String, p1: Any): ExceptionContext
Link copied to clipboard
Link copied to clipboard

Recursively collects the causes of this exception, with the direct cause of this exception appearing first.

Link copied to clipboard
Link copied to clipboard
open override fun getContextEntries(): MutableList<Pair<String, Any>>
Link copied to clipboard
open override fun getContextLabels(): MutableSet<String>
Link copied to clipboard
open override fun getContextValues(p0: String): MutableList<Any>
Link copied to clipboard
open override fun getFirstContextValue(p0: String): Any
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun setContextValue(p0: String, p1: Any): ExceptionContext
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Converts this into a ContextedIllegalStateException with context attached.

inline fun Exception.withContext(vararg context: Pair<String?, Any?>): ContextedException

Converts this into a ContextedException with context attached.

Converts this exception into a ContextedRuntimeException with context attached.