HError

harness.core.HError$
See theHError companion class
object HError

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
HError.type

Members list

Concise view

Type members

Classlikes

final class ??? extends Single

Analogous to the scala predef '???', except instead of throwing, it gives you a concrete error type.

Analogous to the scala predef '???', except instead of throwing, it gives you a concrete error type.

Attributes

Companion:
object
Graph
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
object ???

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
???.type
abstract class ErrorBuilder2[+E](build: (String, List[Throwable]) => E)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ErrorBuilder3[E]
object UserError.type
object InternalDefect.type
object SystemFailure.type
abstract class ErrorBuilder3[+E](build: (String, String, List[Throwable]) => E) extends ErrorBuilder2[E]

Attributes

Graph
Supertypes
class ErrorBuilder2[E]
class Object
trait Matchable
class Any
Known subtypes
object UserError.type
final class InternalDefect extends Single

Used when you want to start the error message with "WTF, why is this happening"

Used when you want to start the error message with "WTF, why is this happening"

  • Map#get(_).thisShouldAlwaysBeThere
  • List#toNel.thisShouldAlwaysBeNonEmpty

Attributes

Companion:
object
Graph
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Multiple extends HError

Attributes

Graph
Supertypes
trait Product
trait Equals
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
abstract class Single(userMessage: UserMessage, internalMessage: String, causes: List[Throwable]) extends HError

Attributes

Graph
Supertypes
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
final class SystemFailure extends Single

Used when there is an error with the system.

Used when there is an error with the system.

  • IO
  • Database
  • Environment

Attributes

Companion:
object
Graph
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class UserError extends Single

Used when the user of the program provides invalid input.

Used when the user of the program provides invalid input.

Attributes

Companion:
object
Graph
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Const
final case class Wrapped extends Single

Only purpose is to lift a non-HError Throwable into an HError. If another HError uses this as a cause, the wrapping will be removed.

Only purpose is to lift a non-HError Throwable into an HError. If another HError uses this as a cause, the wrapping will be removed.

Attributes

Graph
Supertypes
trait Product
trait Equals
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(err: NonEmptyList[HError]): HError
inline def apply(err0: HError, errN: HError*): HError
def fromThrowable(throwable: Throwable): HError
def unwrap(err: HError): NonEmptyList[Single]