git-annex/CmdLine
Joey Hess 39fbaa0682
catch all (non-async) exceptions when running a commandAction
When a command is operating on multiple files and there's an error with
one, try harder to continue to the rest. (As was already done for many
types of errors including IO errors.)

This handles cases like lockContentForRemoval throwing an exception when
the content is already locked. Just because a drop of one file fails, does
not mean it shouldn't go on to try to drop other files.

I looked over uses of `giveup` in Command/*; there are too many to check
them all extensively, but none stood out as being problems that should let
one commandAction stop running other commandActions. Worst case, something
bad will happen and rather than stopping right away with an error,
git-annex will display multiple errors as it fails over and over on each
file. I don't think I ever really intended `error`/`giveup` to stop other
commandActions; this was a relic of old confusion over haskell exception
handling.

Test suite passes.

This commit was sponsored by Ethan Aubin.
2018-11-15 15:59:43 -04:00
..
GitAnnex annex.jobs 2018-10-04 12:47:27 -04:00
GitAnnexShell GIT_ANNEX_SHELL_APPENDONLY 2018-05-25 13:17:56 -04:00
Action.hs catch all (non-async) exceptions when running a commandAction 2018-11-15 15:59:43 -04:00
Batch.hs added -z 2018-09-20 16:11:47 -04:00
GitAnnex.hs Added inprogress command for accessing files as they are being downloaded. 2017-12-28 11:46:39 -04:00
GitAnnexShell.hs GIT_ANNEX_SHELL_APPENDONLY 2018-05-25 13:17:56 -04:00
GitRemoteTorAnnex.hs clean P2P protocol shutdown on EOF try 2 2018-09-25 16:49:59 -04:00
GlobalSetter.hs mapM_ = sequence_ . map 2017-02-27 14:48:07 -04:00
Option.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Seek.hs sync --content now supports --hide-missing adjusted branches 2018-10-19 17:51:25 -04:00
Usage.hs initial export command 2017-08-29 15:10:01 -04:00