diff --git a/src/GitmonClient.hs b/src/GitmonClient.hs index 497e80e7c..767024b49 100644 --- a/src/GitmonClient.hs +++ b/src/GitmonClient.hs @@ -92,7 +92,7 @@ reportGitmon' SocketFactory{..} program gitCommand = do _ -> gitCommand throwGitmonException :: ByteString -> e - throwGitmonException command = throw . GitmonException . unpack $ "Received from Gitmon: '" <> decodeUtf8 command <> "' from Gitmon" + throwGitmonException command = throw . GitmonException . unpack $ "Received: '" <> decodeUtf8 command <> "' from Gitmon" collectStats :: IO (TimeSpec, ProcInfo) collectStats = do diff --git a/test/GitmonClientSpec.hs b/test/GitmonClientSpec.hs index 2c71198e3..0dac0f93e 100644 --- a/test/GitmonClientSpec.hs +++ b/test/GitmonClientSpec.hs @@ -79,7 +79,10 @@ spec = parallel $ do liftIO $ sendAll server "fail too busy" object <- parseObjOid (pack "dfac8fd681b0749af137aebf3203e77a06fbafc2") - liftIO $ shouldThrow (runReaderT (reportGitmon' socketFactory "cat-file" (lookupCommit object)) repo) anyErrorCall + liftIO $ shouldThrow (runReaderT (reportGitmon' socketFactory "cat-file" (lookupCommit object)) repo) gitmonException + +gitmonException :: GitmonException -> Bool +gitmonException = const True withSocketPair :: ((Socket, Socket, SocketFactory) -> IO c) -> IO c withSocketPair = bracket create release