HError

object HError
Companion:
class
class Object
trait Matchable
class Any
HError.type

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.

Companion:
object
object ???
Companion:
class
abstract class ErrorBuilder2[+E](build: (String, List[Throwable]) => E)
abstract class ErrorBuilder3[+E](build: (String, String, List[Throwable]) => E) extends ErrorBuilder2[E]
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
Companion:
object
final case class Multiple extends HError
abstract class Single(userMessage: UserMessage, internalMessage: String, causes: List[Throwable]) extends HError
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
Companion:
object
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.

Companion:
object
Companion:
class
Companion:
class
Companion:
object
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.

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]