OxApp

ox.OxApp
See theOxApp companion trait
object OxApp

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
OxApp.type

Members list

Type members

Classlikes

case class Settings(interruptedExitCode: ExitCode, handleInterruptedException: InterruptedException => Unit, handleException: Throwable => Unit)

Settings for an OxApp. Defaults are defined in Settings.Default.

Settings for an OxApp. Defaults are defined in Settings.Default.

Value parameters

handleException

Callback used for exceptions that are thrown by the application's body, causing the application to terminate with a failed ExitCode. By default the exception's stack trace is printed to stderr (unless a default uncaught exception handler is set).

handleInterruptedException

Callback used for the interrupted exception that might be thrown by the application's body, w.g. when the the application is interrupted using SIGINT/SIGTERM. By default, the handler looks for any exceptions that are not instances of InterruptedException (as this is considered part of "normal" shutdown process), and prints their stack trace to stderr (unless a default uncaught exception handler is set).

interruptedExitCode

This value is returned to the operating system as the exit code when the app receives SIGINT/SIGTERM and shuts itself down gracefully. By default, the value is ExitCode.Success. JVM itself returns code 130 when it receives SIGINT.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Settings

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Settings.type
trait Simple extends OxApp

Simple variant of OxApp does not pass command line arguments and exits with exit code 0 if no exceptions were thrown.

Simple variant of OxApp does not pass command line arguments and exits with exit code 0 if no exceptions were thrown.

Attributes

Supertypes
trait OxApp
class Object
trait Matchable
class Any
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.

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

Supertypes
trait WithErrorMode[E, [T] =>> Either[E, T]]
trait OxApp
class Object
trait Matchable
class Any
trait WithErrorMode[E, F[_]](em: ErrorMode[E, F]) extends OxApp

WithErrorMode variant of OxApp allows to specify what kind of error handling for the main function should be used. Base trait for integrations.

WithErrorMode variant of OxApp allows to specify what kind of error handling for the main function should be used. Base trait for integrations.

Type parameters

E

Error type

F

wrapper type for given ErrorMode

Attributes

Supertypes
trait OxApp
class Object
trait Matchable
class Any
Known subtypes
class WithEitherErrors[E]