trait ParentCantonError[+T <: BaseCantonError] extends BaseCantonError
Mixing trait for nested errors
The classic situation when we re-wrap errors:
sealed trait CryptoError extends CantonError
sealed trait ProcessingError extends CantonError
// NOTE, this error is NOT created within an ErrorCode, as we just inherit the parent error case class CryptoNoBueno(someArgs: String, parent: CryptoError) extends ProcessingError with ParentCantonError[CryptoError] { // we can mixin our context variables override def mixinContext: Map[String, String] = Map("someArgs" -> someArgs) }
Now in the following situation, the someCryptoOp method would generate the CryptoError. This CryptoError would be logged already (on creation) and therefore, the ParentCantonError disabled logging on creation.
for { _ <- someCryptoOp(..).leftMap(CryptoNoBueno("oh nooo", _)) } yields ()
- Alphabetic
- By Inheritance
- ParentCantonError
- BaseCantonError
- BaseError
- LocationMixin
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def parent: T
The parent error that we want to nest
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def asGrpcError(implicit loggingContext: ErrorLoggingContext): StatusRuntimeException
- Definition Classes
- BaseCantonError
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cause: String
- Definition Classes
- ParentCantonError → BaseError
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def code: ErrorCode
The error code, usually passed in as implicit where the error class is defined
The error code, usually passed in as implicit where the error class is defined
- Definition Classes
- ParentCantonError → BaseCantonError → BaseError
- def context: Map[String, String]
- Definition Classes
- ParentCantonError → BaseCantonError → BaseError
- def definiteAnswerO: Option[Boolean]
- Definition Classes
- BaseError
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val location: Option[String]
- Definition Classes
- LocationMixin
- def log()(implicit loggingContext: ErrorLoggingContext): Unit
- Definition Classes
- BaseCantonError
- def logWithContext(extra: Map[String, String])(implicit contextualizedErrorLogger: ContextualizedErrorLogger): Unit
- Definition Classes
- BaseError
- def mixinContext: Map[String, String]
The context we want to mix-in
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def resources: Seq[(ErrorResource, String)]
- Definition Classes
- BaseError
- def retryable: Option[ErrorCategoryRetry]
- Definition Classes
- BaseError
- def rpcStatus(overrideCode: Option[Code] = None)(implicit loggingContext: ErrorLoggingContext): Status
- Definition Classes
- BaseCantonError
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def throwableO: Option[Throwable]
- Definition Classes
- BaseError
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])