kantan.codecs.error

Members list

Type members

Classlikes

abstract class Error(message: String) extends Exception, Product, Serializable

Base class for errors

Base class for errors

This is specifically meant for errors represented as ADTs. The fact that it extends Exception is an unfortunate side effect of the Scala stdlib's reliance on exceptions, as seen with scala.concurrent.Future and scala.util.Try, for example.

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
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.

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

Attributes

Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object CloseError
object OpenError
object ProcessError
object DecodeError
trait IsError[E] extends Serializable

Type class for types that can be used as errors.

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
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
IsError[E]
object IsError

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
IsError.type