audit all uses of SomeException to avoid catching async exceptions
Except for the assistant, which I think may use them between threads? Most of the uses of SomeException were already catching only async exceptions. But I did find a few places that were accidentially catching them.
This commit is contained in:
parent
dca19099a9
commit
319f2a4afc
4 changed files with 4 additions and 7 deletions
|
@ -14,7 +14,6 @@ module CmdLine (
|
|||
|
||||
import qualified Options.Applicative as O
|
||||
import qualified Options.Applicative.Help as H
|
||||
import qualified Control.Exception as E
|
||||
import Control.Exception (throw)
|
||||
|
||||
import Annex.Common
|
||||
|
@ -31,7 +30,7 @@ import Types.Messages
|
|||
dispatch :: Bool -> CmdParams -> [Command] -> [GlobalOption] -> [(String, String)] -> IO Git.Repo -> String -> String -> IO ()
|
||||
dispatch fuzzyok allargs allcmds globaloptions fields getgitrepo progname progdesc = do
|
||||
setupConsole
|
||||
go =<< (E.try getgitrepo :: IO (Either E.SomeException Git.Repo))
|
||||
go =<< tryNonAsync getgitrepo
|
||||
where
|
||||
go (Right g) = do
|
||||
state <- Annex.new g
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue