| Copyright | (c) 2020 berberman |
|---|---|
| License | MIT |
| Maintainer | berberman <1793913507@qq.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Distribution.ArchHs.Exception
Description
Exceptions used in this project.
Synopsis
- type WithMyErr = Error MyException
- data MyException
- printHandledIOException :: IO () -> IO ()
- printAppResult :: IO (Either MyException ()) -> IO ()
- interceptHttpException :: Members [WithMyErr, Embed IO] r => IO a -> Sem r a
Documentation
type WithMyErr = Error MyException Source #
Error effect of MyException
data MyException Source #
Custom exception used in this project
Constructors
| forall n.HasMyName n => PkgNotFound n | |
| VersionNotFound PackageName Version | |
| TargetExist PackageName DependencyProvider | |
| CyclicExist [PackageName] | |
| NetworkException HttpException |
Instances
| Show MyException Source # | |
Defined in Distribution.ArchHs.Exception Methods showsPrec :: Int -> MyException -> ShowS # show :: MyException -> String # showList :: [MyException] -> ShowS # | |
printHandledIOException :: IO () -> IO () Source #
Catch IOException and print it.
printAppResult :: IO (Either MyException ()) -> IO () Source #
Print the result of errorToIOFinal.
interceptHttpException :: Members [WithMyErr, Embed IO] r => IO a -> Sem r a Source #
Catch the HttpException thrown in IO monad, then re-throw it with NetworkException.