E

e.scala.E
See theE companion object
final case class E(code: Option[Int], name: Option[String], message: Option[String], causes: List[E], data: Map[String, String], time: Option[Long])

A generic and immutable error, containing helpful information

Value parameters

causes

Underlying cause(s) of this error, if any

code

A numeric code identifying this error

data

Arbitrary data related to this error as a key-value map

message

A message about this error, usually human-readable

name

A name identifying this error, usually enum-like

time

Time when this error occurred as milliseconds, see java.lang.System#currentTimeMillis

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def cause(e: E): E

Constructs an E adding given cause

Constructs an E adding given cause

Value parameters

e

A cause

Attributes

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

Value parameters

condition

Some condition on which to add the cause

e

A cause

Attributes

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: List[E]): E

Constructs an E adding given causes

Constructs an E adding given causes

Value parameters

c

Causes as a List

Attributes

Returns

A new E containing causes of this E and given causes

def causes(c: E*): E

Constructs an E adding given causes

Constructs an E adding given causes

Value parameters

c

Causes as variable arguments

Attributes

Returns

A new E containing causes of this E and given causes

def code(c: Int): E

Constructs an E containing given code

Constructs an E containing given code

Value parameters

c

A code

Attributes

Returns

A new E containing given code

def data(d: Map[String, String]): E

Constructs an E adding given data

Constructs an E adding given data

Value parameters

d

Data as a key-value map

Attributes

Returns

A new E containing data of this E and given data

def data[V](k: String, v: V): E

Constructs an E adding given data entry

Constructs an E adding given data entry

Type parameters

V

Type of value of data entry

Value parameters

k

Key of data entry

v

Value of data entry

Attributes

Returns

A new E containing data of this E and given data entry

def data[V](t: (String, V)): E

Constructs an E adding given data entry

Constructs an E adding given data entry

Type parameters

V

Type of value of data entry

Value parameters

t

Data entry

Attributes

Returns

A new E containing data of this E and given data entry

def message(m: String): E

Constructs an E containing given message

Constructs an E containing given message

Value parameters

m

Message to set

Attributes

Returns

A new E containing given message

def name(n: String): E

Constructs an E containing given name

Constructs an E containing given name

Value parameters

n

A name

Attributes

Returns

A new E containing given name

def now: E

Constructs an E containing time set to now

Constructs an E containing time set to now

Attributes

Returns

A new E containing time set to now

See also

java.lang.System#currentTimeMillis

def time(t: Long): E

Constructs an E containing given time

Constructs an E containing given time

Value parameters

t

A time

Attributes

Returns

A new E containing given time

def toEOr[A]: EOr[A]

Converts this E to a failed EOr

Converts this E to a failed EOr

Type parameters

A

The A type in resulting EOr

Attributes

Returns

An EOr containing this E

See also

Converts this E into an exception

Converts this E into an exception

Attributes

Returns

An e.scala.EException containing this E

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

Whether or not a cause is set

Whether or not a cause is set

Attributes

Whether or not a code is set

Whether or not a code is set

Attributes

Whether or not a data is set

Whether or not a data is set

Attributes

Whether or not a message is set

Whether or not a message is set

Attributes

Whether or not a name is set

Whether or not a name is set

Attributes

Whether or not a time is set

Whether or not a time is set

Attributes