diff options
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index da4f674514..d0e1ca88b5 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -430,7 +430,7 @@ compileFile :: HscEnv -> Phase -> (FilePath, Maybe Phase) -> IO FilePath compileFile hsc_env stop_phase (src, mb_phase) = do exists <- doesFileExist src when (not exists) $ - ghcError (CmdLineError ("does not exist: " ++ src)) + throwGhcException (CmdLineError ("does not exist: " ++ src)) let dflags = hsc_dflags hsc_env @@ -526,7 +526,7 @@ runPipeline stop_phase hsc_env0 (input_fn, mb_phase) -- before B in a normal compilation pipeline. when (not (start_phase `happensBefore` stop_phase)) $ - ghcError (UsageError + throwGhcException (UsageError ("cannot compile this file to desired target: " ++ input_fn)) @@ -1813,7 +1813,7 @@ linkBinary dflags o_files dep_packages = do -- parallel only: move binary to another dir -- HWL success <- runPhase_MoveBinary dflags output_fn if success then return () - else ghcError (InstallationError ("cannot move binary")) + else throwGhcException (InstallationError ("cannot move binary")) exeFileName :: DynFlags -> FilePath |