ErrorCompanion

kantan.codecs.error.ErrorCompanion
abstract class ErrorCompanion[T <: Error](defaultMsg: String)(f: String => T) extends Serializable

Provides useful instance creation methods for errors that might be created as a result of Java exceptions.

Attributes

Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object CloseError
object OpenError
object ProcessError
object DecodeError

Members list

Value members

Concrete methods

def apply(msg: String, cause: Throwable): T
def apply(cause: Throwable): T
def apply(msg: String): T
def safe[A](a: => A): Either[T, A]

Attempts to evaluate the specified argument, wrapping errors in a T.

Attempts to evaluate the specified argument, wrapping errors in a T.

Attributes

Implicits

Implicits

implicit val isError: IsError[T]