Commit 3c23b14c authored by andy@galois.com's avatar andy@galois.com
Browse files

Adding hpcError, that improves error messages with usage

parent 8788d157
......@@ -7,6 +7,7 @@ import Data.Maybe ( fromMaybe )
import qualified HpcSet as Set
import Data.Char
import Trace.Hpc.Tix
import System.Exit
data Flags = Flags
{ outputFile :: String
......@@ -108,6 +109,12 @@ command_usage plugin =
then ""
else usageInfo "\n\nOptions:\n" (options plugin)
hpcError :: Plugin -> String -> IO a
hpcError plugin msg = do
putStrLn $ "Error: " ++ msg
command_usage plugin
exitFailure
-------------------------------------------------------------------------------
data Plugin = Plugin { name :: String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment