Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type ExitFailure = Int
- exitReasontoExitFailure ∷ ExitReason → ExitFailure
- data ExitReason
- toExitReason ∷ ∀ blk. (Typeable blk, StandardHash blk) ⇒ Proxy blk → SomeException → ExitReason
ExitFailure
type ExitFailure = Int Source #
The exit code to return when terminating with an exception.
To be used in the ExitFailure
constructor of ExitCode
.
Note that a node will never turn shut down itself, it is meant to run
forever, so it will always terminate with an ExitFailure
.
exitReasontoExitFailure ∷ ExitReason → ExitFailure Source #
Convert an ExitReason
to an ExitFailure
.
ExitReason
data ExitReason Source #
The reason of shutting down
Killed | The node process was killed, by the |
ConfigurationError | Something is wrong with the node configuration, the user should check it. For example, for PBFT, it could be that the block signing key and the delegation certificate do not match. |
WrongDatabase | We were unable to open the database, probably the user is using the
wrong directory. See |
DiskFull | The disk is full, make some space before restarting the node. |
InsufficientPermissions | The database folder doesn't have the right permissions. |
NoNetwork | There is a problem with the network connection, the user should investigate. TODO We're not yet returning this. |
DatabaseCorruption | Something went wrong with the database, restart the node with recovery enabled. |
Other | Some exception was thrown. The node should just be restarted. |
toExitReason ∷ ∀ blk. (Typeable blk, StandardHash blk) ⇒ Proxy blk → SomeException → ExitReason Source #
Return the ExitReason
for the given SomeException
. Defaults to
Other
.