From: pho Date: Tue, 20 Jan 2009 00:22:28 +0000 (+0900) Subject: No need to define our own methods for Exception Abortion X-Git-Tag: RELEASE-0_2_1~2 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=0b39e041a86e883b60096fe08f202798cc69f4eb;p=Lucu.git No need to define our own methods for Exception Abortion darcs-hash:20090120002228-62b54-d14e039d9e73f9ee0c3661e2c18f804bf721da3b.gz --- diff --git a/Network/HTTP/Lucu/Abortion.hs b/Network/HTTP/Lucu/Abortion.hs index 52e7e23..33f22ab 100644 --- a/Network/HTTP/Lucu/Abortion.hs +++ b/Network/HTTP/Lucu/Abortion.hs @@ -38,9 +38,7 @@ data Abortion = Abortion { , aboMessage :: !(Maybe String) } deriving (Show, Typeable) -instance Exception Abortion where - toException = SomeException - fromException (SomeException e) = cast e +instance Exception Abortion -- |Computation of @'abort' status headers msg@ aborts the -- 'Network.HTTP.Lucu.Resource.Resource' monad with given status, diff --git a/Network/HTTP/Lucu/Resource/Tree.hs b/Network/HTTP/Lucu/Resource/Tree.hs index 40a4150..de19e04 100644 --- a/Network/HTTP/Lucu/Resource/Tree.hs +++ b/Network/HTTP/Lucu/Resource/Tree.hs @@ -32,7 +32,6 @@ import Network.HTTP.Lucu.Interaction import Network.HTTP.Lucu.Utils import Network.URI hiding (path) import System.IO -import System.IO.Error hiding (catch) import Prelude hiding (catch) @@ -261,9 +260,3 @@ runResource def itr $ hPutStrLn stderr $ show abo flip runRes itr $ driftTo Done - - formatIOE :: IOError -> String - formatIOE ioE = if isUserError ioE then - ioeGetErrorString ioE - else - show ioE