final case class E(code: Option[Int] = None, name: Option[String] = None, message: Option[String] = None, causes: List[E] = List.empty, data: Map[String, String] = Map.empty, time: Option[Long] = None) extends Product with Serializable
A generic and immutable error, containing helpful information
- code
A numeric code identifying this error
- name
A name identifying this error, usually enum-like
- message
A message about this error, usually human-readable
- causes
Underlying cause(s) of this error, if any
- data
Arbitrary data related to this error as a key-value map
- time
Time when this error occurred as milliseconds, see java.lang.System#currentTimeMillis
- Alphabetic
- By Inheritance
- E
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new E(code: Option[Int] = None, name: Option[String] = None, message: Option[String] = None, causes: List[E] = List.empty, data: Map[String, String] = Map.empty, time: Option[Long] = None)
- code
A numeric code identifying this error
- name
A name identifying this error, usually enum-like
- message
A message about this error, usually human-readable
- causes
Underlying cause(s) of this error, if any
- data
Arbitrary data related to this error as a key-value map
- time
Time when this error occurred as milliseconds, see java.lang.System#currentTimeMillis
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cause(e: E): E
Constructs an E adding given cause
Constructs an E adding given cause
- e
A cause
- returns
A new E containing causes of this E and given causes
- def causeIf(condition: Boolean, e: => E): E
Constructs an E adding given cause if condition holds
Constructs an E adding given cause if condition holds
- condition
Some condition on which to add the cause
- e
A cause
- returns
A new E containing causes of this E and given cause or this E as is if condition doesn't hold
- def causes(c: E*): E
Constructs an E adding given causes
Constructs an E adding given causes
- c
Causes as variable arguments
- returns
A new E containing causes of this E and given causes
- def causes(c: List[E]): E
Constructs an E adding given causes
Constructs an E adding given causes
- c
Causes as a List
- returns
A new E containing causes of this E and given causes
- val causes: List[E]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def code(c: Int): E
Constructs an E containing given code
Constructs an E containing given code
- c
A code
- returns
A new E containing given code
- val code: Option[Int]
- def data[V](t: (String, V)): E
Constructs an E adding given data entry
Constructs an E adding given data entry
- V
Type of value of data entry
- t
Data entry
- returns
A new E containing data of this E and given data entry
- def data[V](k: String, v: V): E
Constructs an E adding given data entry
Constructs an E adding given data entry
- V
Type of value of data entry
- k
Key of data entry
- v
Value of data entry
- returns
A new E containing data of this E and given data entry
- def data(d: Map[String, String]): E
Constructs an E adding given data
Constructs an E adding given data
- d
Data as a key-value map
- returns
A new E containing data of this E and given data
- val data: Map[String, String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- val hasCause: Boolean
Whether or not a cause is set
- val hasCode: Boolean
Whether or not a code is set
- val hasData: Boolean
Whether or not a data is set
- val hasMessage: Boolean
Whether or not a message is set
- val hasName: Boolean
Whether or not a name is set
- val hasTime: Boolean
Whether or not a time is set
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def message(m: String): E
Constructs an E containing given message
Constructs an E containing given message
- m
Message to set
- returns
A new E containing given message
- val message: Option[String]
- def name(n: String): E
Constructs an E containing given name
Constructs an E containing given name
- n
A name
- returns
A new E containing given name
- val name: Option[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def now: E
Constructs an E containing time set to now
Constructs an E containing time set to now
- returns
A new E containing time set to now
- See also
java.lang.System#currentTimeMillis
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def time(t: Long): E
Constructs an E containing given time
Constructs an E containing given time
- t
A time
- returns
A new E containing given time
- val time: Option[Long]
- def toEOr[A]: EOr[A]
Converts this E to a failed EOr
Converts this E to a failed EOr
- A
The A type in resulting EOr
- returns
An EOr containing this E
- See also
- def toException: EException
Converts this E into an exception
Converts this E into an exception
- returns
An e.scala.EException containing this E
- def toString(): String
- Definition Classes
- E → 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])