IsError

kantan.codecs.error.IsError
See theIsError companion object
trait IsError[E] extends Serializable

Type class for types that can be used as errors.

This is mostly meant to work in conjunction with Error, and lets code that deals with errors turn them into values of the right error type.

Attributes

Companion
object
Source
IsError.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
IsError[E]

Members list

Value members

Abstract methods

def from(msg: String, t: Throwable): E

Creates a new instance of E from an error message and exception.

Creates a new instance of E from an error message and exception.

Attributes

Source
IsError.scala
def fromMessage(msg: String): E

Creates a new instance of E from an error message.

Creates a new instance of E from an error message.

Attributes

Source
IsError.scala

Creates a new instance of E from an exception.

Creates a new instance of E from an exception.

Attributes

Source
IsError.scala

Concrete methods

def map[EE](f: E => EE): IsError[EE]

Attributes

Source
IsError.scala
def safe[A](a: => A): Either[E, A]

Safely evaluates the specified argument, wrapping errors in a E.

Safely evaluates the specified argument, wrapping errors in a E.

Attributes

Source
IsError.scala