License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Failure
Description
A data type to represent system failures (as distinct from robot program failures).
These failures are often not fatal and serve to create common infrastructure for logging.
Synopsis
- data SystemFailure
- simpleErrorHandle :: ThrowC SystemFailure IO a -> IO a
- data AssetData
- data Asset
- data Entry
- data LoadingFailure
- data OrderFileWarning
Documentation
data SystemFailure Source #
An enumeration of various types of failures (errors or warnings) that can occur.
Constructors
Instances
Show SystemFailure Source # | |
Defined in Swarm.Failure Methods showsPrec :: Int -> SystemFailure -> ShowS # show :: SystemFailure -> String # showList :: [SystemFailure] -> ShowS # | |
PrettyPrec SystemFailure Source # | |
Defined in Swarm.Failure Methods prettyPrec :: Int -> SystemFailure -> Doc ann Source # |
simpleErrorHandle :: ThrowC SystemFailure IO a -> IO a Source #
Enumeration of various assets we can attempt to load.
Overarching enumeration of various assets we can attempt to load.
Constructors
Achievement | |
Data AssetData | |
History | |
Keybindings | |
Save |
Enumeration type to distinguish between directories and files.
data LoadingFailure Source #
An error that occurred while attempting to load some kind of asset.
Constructors
DoesNotExist Entry | |
EntryNot Entry | |
CanNotParseYaml ParseException | |
Duplicate AssetData Text | |
SystemFailure SystemFailure |
Instances
Show LoadingFailure Source # | |
Defined in Swarm.Failure Methods showsPrec :: Int -> LoadingFailure -> ShowS # show :: LoadingFailure -> String # showList :: [LoadingFailure] -> ShowS # | |
PrettyPrec LoadingFailure Source # | |
Defined in Swarm.Failure Methods prettyPrec :: Int -> LoadingFailure -> Doc ann Source # |
data OrderFileWarning Source #
A warning that arose while processing an 00-ORDER.txt
file.
Constructors
NoOrderFile | |
MissingFiles (NonEmpty FilePath) | |
DanglingFiles (NonEmpty FilePath) |
Instances
Show OrderFileWarning Source # | |
Defined in Swarm.Failure Methods showsPrec :: Int -> OrderFileWarning -> ShowS # show :: OrderFileWarning -> String # showList :: [OrderFileWarning] -> ShowS # | |
Eq OrderFileWarning Source # | |
Defined in Swarm.Failure Methods (==) :: OrderFileWarning -> OrderFileWarning -> Bool # (/=) :: OrderFileWarning -> OrderFileWarning -> Bool # | |
PrettyPrec OrderFileWarning Source # | |
Defined in Swarm.Failure Methods prettyPrec :: Int -> OrderFileWarning -> Doc ann Source # |