Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pythia.Control.Exception
Contents
Description
Provides various exception types.
Since: 0.1
Synopsis
Miscellaneous Exceptions
data CommandException Source #
Exceptions encountered while running a shell command.
Examples
>>>
putStrLn $ displayException $ MkCommandException "some command" "an error message"
Command exception. Command: <some command>. Error: <an error message>
Since: 0.1
Constructors
MkCommandException Command Text |
Instances
Exception CommandException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods toException :: CommandException -> SomeException # | |
Show CommandException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods showsPrec :: Int -> CommandException -> ShowS # show :: CommandException -> String # showList :: [CommandException] -> ShowS # | |
Eq CommandException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods (==) :: CommandException -> CommandException -> Bool # (/=) :: CommandException -> CommandException -> Bool # |
newtype SomeExceptions Source #
Collects 1 or more exceptions.
Examples
>>>
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
Constructors
MkSomeExceptions (NonEmpty SomeException) |
Instances
Semigroup SomeExceptions Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods (<>) :: SomeExceptions -> SomeExceptions -> SomeExceptions # sconcat :: NonEmpty SomeExceptions -> SomeExceptions # stimes :: Integral b => b -> SomeExceptions -> SomeExceptions # | |
Exception SomeExceptions Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods toException :: SomeExceptions -> SomeException # | |
Show SomeExceptions Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods showsPrec :: Int -> SomeExceptions -> ShowS # show :: SomeExceptions -> String # showList :: [SomeExceptions] -> ShowS # |
newtype NotSupportedException Source #
Error for when the current app is not supported.
Examples
>>>
putStrLn $ displayException $ MkNotSupportedException "app1"
App not supported: <app1>
Since: 0.1
Constructors
MkNotSupportedException Text |
Instances
Exception NotSupportedException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception | |
Show NotSupportedException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods showsPrec :: Int -> NotSupportedException -> ShowS # show :: NotSupportedException -> String # showList :: [NotSupportedException] -> ShowS # | |
Eq NotSupportedException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods (==) :: NotSupportedException -> NotSupportedException -> Bool # (/=) :: NotSupportedException -> NotSupportedException -> Bool # |
data NoActionsRunException Source #
Error for when no actions are run.
Examples
>>>
putStrLn $ displayException MkNoActionsRunException
No actions run
Since: 0.1
Constructors
MkNoActionsRunException |
Instances
Exception NoActionsRunException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception | |
Show NoActionsRunException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods showsPrec :: Int -> NoActionsRunException -> ShowS # show :: NoActionsRunException -> String # showList :: [NoActionsRunException] -> ShowS # | |
Eq NoActionsRunException Source # | Since: 0.1 |
Defined in Pythia.Control.Exception Methods (==) :: NoActionsRunException -> NoActionsRunException -> Bool # (/=) :: NoActionsRunException -> NoActionsRunException -> Bool # |