Conflict

class Conflict(message: String?, data: IPersistentMap = PersistentHashMap.EMPTY, cause: Throwable? = null) : Anomaly.Caller

Constructors

Link copied to clipboard
constructor(message: String?, data: IPersistentMap = PersistentHashMap.EMPTY, cause: Throwable? = null)
constructor(message: String? = null, errorCode: String? = null, data: Map<String, *>? = null, cause: Throwable? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open override val data: IPersistentMap
Link copied to clipboard
open override val message: String?

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getData(): IPersistentMap
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun mergeCtx(ctx: Map<String, *>): Conflict

Return a fresh anomaly of the same category with ctx merged into the existing data, preserving this instance as the cause. An empty ctx returns this instance unchanged.

Link copied to clipboard
fun Throwable.toAnomaly(ctx: Map<String, *> = emptyMap<String, Any?>()): Anomaly

Convert a Throwable to the appropriate Anomaly subclass, attaching ctx as extra context data. An incoming Anomaly is wrapped in a fresh instance of the same category with the merged context, preserving the original as the cause.