WithEitherErrors

ox.OxApp.WithEitherErrors
abstract class WithEitherErrors[E] extends WithErrorMode[E, [T] =>> Either[E, T]]

WithEitherErrors variant of OxApp integrates OxApp with an either block and allows for usage of .ok() combinators in the body of the main function.

Type parameters

E

Error type

Attributes

Graph
Supertypes
trait WithErrorMode[E, [T] =>> Either[E, T]]
trait OxApp
class Object
trait Matchable
class Any

Members list

Type members

Types

type EitherError[Err] = Label[Either[Err, ExitCode]]

Value members

Abstract methods

def run(args: Vector[String])(using Ox, EitherError[E]): ExitCode

Concrete methods

final override def runWithErrors(args: Vector[String])(using Ox): Either[E, ExitCode]

This template method is to be implemented by abstract classes that add integration for particular error handling data structure of type F[_].

This template method is to be implemented by abstract classes that add integration for particular error handling data structure of type F[_].

Attributes

Definition Classes

Inherited methods

final def main(args: Array[String]): Unit

Attributes

Inherited from:
OxApp
final override def run(args: Vector[String])(using Ox): ExitCode

Attributes

Definition Classes
Inherited from:
WithErrorMode

Inherited and Abstract methods

def handleError(e: E): ExitCode

Allows implementor of this trait to translate an error that app finished with into a concrete ExitCode.

Allows implementor of this trait to translate an error that app finished with into a concrete ExitCode.

Attributes

Inherited from:
WithErrorMode