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

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
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object ???

Attributes

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

Attributes

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

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
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

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

Attributes

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

Attributes

Supertypes
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class ???
class UserError
class Wrapped
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
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
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
Supertypes
class Single
class HError
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
UserError.type
object UserMessage

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait UserMessage

Attributes

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

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

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]