Packages

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. E
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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

  6. 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

  7. 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

  8. 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

  9. val causes: List[E]
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. 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

  12. val code: Option[Int]
  13. 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

  14. 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

  15. 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

  16. val data: Map[String, String]
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. val hasCause: Boolean

    Whether or not a cause is set

  20. val hasCode: Boolean

    Whether or not a code is set

  21. val hasData: Boolean

    Whether or not a data is set

  22. val hasMessage: Boolean

    Whether or not a message is set

  23. val hasName: Boolean

    Whether or not a name is set

  24. val hasTime: Boolean

    Whether or not a time is set

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. 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

  27. val message: Option[String]
  28. 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

  29. val name: Option[String]
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  33. 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

  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  35. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  36. 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

  37. val time: Option[Long]
  38. 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

    e.scala.EOr

  39. def toException: EException

    Converts this E into an exception

    Converts this E into an exception

    returns

    An e.scala.EException containing this E

  40. def toString(): String
    Definition Classes
    E → AnyRef → Any
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped