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

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

Creates a new instance of E from an exception.

Creates a new instance of E from an exception.

Attributes

Concrete methods

def map[EE](f: E => EE): IsError[EE]
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