summaryrefslogtreecommitdiff
path: root/Core.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-31 18:04:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-31 18:04:34 -0400
commitfd6611f9554e43f2bc365f7ef70f90877c9403d0 (patch)
treeb4b91e6448ea839a419e8a94e9f8dc1c013c99c7 /Core.hs
parentb220e117f2e06133919ad31e9cc225470f501566 (diff)
Fix crash on unknown symlinks.
Diffstat (limited to 'Core.hs')
-rw-r--r--Core.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Core.hs b/Core.hs
index ebe5d2966..e2e6eaa0c 100644
--- a/Core.hs
+++ b/Core.hs
@@ -165,3 +165,10 @@ showEndOk = verbose $ do
showEndFail :: Annex ()
showEndFail = verbose $ do
liftIO $ putStrLn "\nfailed"
+
+{- Exception pretty-printing. -}
+showErr :: (Show a) => a -> Annex ()
+showErr e = warning $ show e
+
+warning :: String -> Annex ()
+warning s = liftIO $ hPutStrLn stderr $ "git-annex: " ++ s