author | Petr Baudis <pasky@suse.cz> | |
Sat, 24 Jun 2006 02:34:44 +0000 (04:34 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 3 Jul 2006 00:14:41 +0000 (17:14 -0700) | ||
commit | 8b9150e3e3cc6bf78b21b2e01dcc5e3ed45597a4 | |
tree | ee3a8602d236a9be09af4aaab98dd15752c9a893 | tree | snapshot |
parent | 97b16c067492506287a6f474e79ef6cbe0a30e49 | commit | diff |
Git.pm: Handle failed commands' output
Currently if an external command returns error exit code, a generic exception
is thrown and there is no chance for the caller to retrieve the command's
output.
This patch introduces a Git::Error::Command exception class which is thrown
in this case and contains both the error code and the captured command output.
You can use the new git_cmd_try statement to fatally catch the exception
while producing a user-friendly message.
It also adds command_close_pipe() for easier checking of exit status of
a command we have just a pipe handle of. It has partial forward dependency
on the next patch, but basically only in the area of documentation.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Currently if an external command returns error exit code, a generic exception
is thrown and there is no chance for the caller to retrieve the command's
output.
This patch introduces a Git::Error::Command exception class which is thrown
in this case and contains both the error code and the captured command output.
You can use the new git_cmd_try statement to fatally catch the exception
while producing a user-friendly message.
It also adds command_close_pipe() for easier checking of exit status of
a command we have just a pipe handle of. It has partial forward dependency
on the next patch, but basically only in the area of documentation.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-fmt-merge-msg.perl | diff | blob | history | |
perl/Git.pm | diff | blob | history |