pythia-0.1: A utility program for retrieving system information.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pythia.Control.Exception

Description

Provides various exception types.

Since: 0.1

Synopsis

Miscellaneous Exceptions

data CommandException Source #

Exceptions encountered while running a shell command.

Examples

Expand
>>> putStrLn $ displayException $ MkCommandException "some command" "an error message"
Command exception. Command: <some command>. Error: <an error message>

Since: 0.1

newtype SomeExceptions Source #

Collects 1 or more exceptions.

Examples

Expand
>>> let ex1 = toException $ MkCommandException "some command" "an error message"
>>> let ex2 = toException $ MkNotSupportedException "app1"
>>> displayException $ MkSomeExceptions $ ex1 :| [ex2]
"Encountered 2 exception(s):\n\n- App not supported: <app1>\n\n- Command exception. Command: <some command>. Error: <an error message>"

Since: 0.1

newtype NotSupportedException Source #

Error for when the current app is not supported.

Examples

Expand
>>> putStrLn $ displayException $ MkNotSupportedException "app1"
App not supported: <app1>

Since: 0.1

data NoActionsRunException Source #

Error for when no actions are run.

Examples

Expand
>>> putStrLn $ displayException MkNoActionsRunException
No actions run

Since: 0.1