Copyright | (c) 2016-2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Utilities for working with database-related exceptions.
- data DBException
- isBadNameException :: DBException -> Bool
- isDBExceptionException :: DBException -> Bool
- isMissingRPMTagException :: DBException -> Bool
- throwIfNothing :: Exception e => Maybe a -> e -> a
- throwIfNothingOtherwise :: Exception e => Maybe a -> e -> (a -> b) -> b
Documentation
data DBException Source #
A general purpose exception type for dealing with things that go wrong when working with the database. This type could grow into a more complex system in the future, if needed. This type is most helpful because runSqlite will roll back the entire transaction if an exception is raised.
DBException String | A general purpose exception type, including an error message. |
MissingRPMTag String | A required tag was missing from the RPM being processed. The argument should be the name of the missing tag. |
BadName String | The name of the package is not parseable. |
isBadNameException :: DBException -> Bool Source #
Is a given DBException
type a BadName
?
isDBExceptionException :: DBException -> Bool Source #
Is a given DBException
type the general DBException
?
isMissingRPMTagException :: DBException -> Bool Source #
Is a given DBException
type a MissingRPMTag
?