From bdf6783b9208cc5b833ca9ee83c7c2d40feb81a9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Oct 2018 15:52:40 -0400 Subject: [PATCH] improve error message --- Command/Migrate.hs | 2 +- Command/ReKey.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Command/Migrate.hs b/Command/Migrate.hs index c830be737c..245197e0dd 100644 --- a/Command/Migrate.hs +++ b/Command/Migrate.hs @@ -80,7 +80,7 @@ perform file oldkey oldbackend newbackend = go =<< genkey (fastMigrate oldbacken forM_ urls $ \url -> setUrlPresent newkey url next $ Command.ReKey.cleanup file oldkey newkey - , error "failed" + , giveup "failed creating link from old to new key" ) genkey Nothing = return Nothing genkey (Just fm) = fm oldkey newbackend afile >>= \case diff --git a/Command/ReKey.hs b/Command/ReKey.hs index ec1cbe2b26..9b7e5f65e8 100644 --- a/Command/ReKey.hs +++ b/Command/ReKey.hs @@ -68,7 +68,7 @@ perform :: FilePath -> Key -> Key -> CommandPerform perform file oldkey newkey = do ifM (inAnnex oldkey) ( unlessM (linkKey file oldkey newkey) $ - giveup "failed" + giveup "failed creating link from old to new key" , unlessM (Annex.getState Annex.force) $ giveup $ file ++ " is not available (use --force to override)" )