adding error handling.
This commit is contained in:
parent
cf0df26560
commit
05f45f1d36
@ -19,7 +19,7 @@ import Data.List (groupBy, sort)
|
|||||||
import Data.List.Split (splitOn)
|
import Data.List.Split (splitOn)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import DynFlags (DynFlags(..), systemPackageConfig)
|
import DynFlags (DynFlags(..), systemPackageConfig)
|
||||||
import Exception (handleIO)
|
import Exception (ghandle, handleIO)
|
||||||
import qualified GHC as G
|
import qualified GHC as G
|
||||||
import Language.Haskell.GhcMod.Convert
|
import Language.Haskell.GhcMod.Convert
|
||||||
import Language.Haskell.GhcMod.Monad
|
import Language.Haskell.GhcMod.Monad
|
||||||
@ -113,7 +113,7 @@ dumpSymbol = do
|
|||||||
Just dir -> do
|
Just dir -> do
|
||||||
let cache = dir </> symbolCache
|
let cache = dir </> symbolCache
|
||||||
pkgdb = dir </> packageCache
|
pkgdb = dir </> packageCache
|
||||||
do -- fixme: bracket
|
ghandle (\(SomeException _) -> return "") $ do
|
||||||
create <- liftIO $ needToCreate cache pkgdb
|
create <- liftIO $ needToCreate cache pkgdb
|
||||||
when create $ do
|
when create $ do
|
||||||
sm <- getSymbol
|
sm <- getSymbol
|
||||||
|
Loading…
Reference in New Issue
Block a user