Kaydet (Commit) 6f83e438 authored tarafından Christian Lohmaier's avatar Christian Lohmaier Kaydeden (comit) Thorsten Behrens

break the habit of throwing away the actually useful error messages

The lines that help dignose a problem is almost never the first one that
just states "there was an error". The explanation of the error follows
in the next lines. So don't quit immediately after the first error-line,
but wait what the command has to tell and log/print the whole info.

Change-Id: I2a4b3470b4b66ed37fa5e5a34d452c548d24b965
Reviewed-on: https://gerrit.libreoffice.org/5861Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Reviewed-by: 's avatarThorsten Behrens <tbehrens@suse.com>
Tested-by: 's avatarThorsten Behrens <tbehrens@suse.com>
üst ce9c390e
......@@ -208,17 +208,16 @@ sub execute #11.07.2007 10:02
{
my $commandline = shift;
my $result = "";
print "$commandline\n" if ($debug);
open(PIPE, "$commandline 2>&1 |") || die "Error: Cant open pipe!\n";
while ( $result = <PIPE> ) {
print LOG "$result" if ($opt_log); # logging
if ( $result =~ /SignTool Error\:/ ) {
close PIPE;
print_error( "$result\n" );
} # if error
} # while
close PIPE;
my $errorlines = "";
print "$commandline\n" if ($debug);
open(PIPE, "$commandline 2>&1 |") || die "Error: Cannot execute '$commandline' - $!\n";
while ( $result = <PIPE> ) {
print LOG "$result" if ($opt_log);
$errorlines .= $result if ($result =~ /SignTool Error\:/);
} # while
close PIPE;
print_error( "$errorlines\n" ) if ($errorlines);
} ##execute
############################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment