git.iko.soy/typeable/postgresql-simple
on master help sign in
Implement the "fail" method for Ok
0f70d15Leon P Smith
src/Database/PostgreSQL/Simple/Ok.hs+1−5
@@ -73,12 +73,8 @@ instance Monad Ok where
73
73
74 Errors es >>= _ = Errors es
74 Errors es >>= _ = Errors es
75 Ok a >>= f = f a
75 Ok a >>= f = f a
76− -- TODO: add a definition for "fail", akin to
77
76
78− -- fail str = Errors [SomeException (error str)]
77+ fail str = Errors [SomeException (ErrorCall str)]
79−
80− -- but *correct*, as this will throw an exception if you try to
81− -- examine the exception.
82
78
83-- | a way to reify a list of exceptions into a single exception
79-- | a way to reify a list of exceptions into a single exception
84
80