Add an explanation to compile errors
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon / Format.pm
index a3b8a65fedd6af3fab66f889b79b3acccdefd9ca..2b60139327f827366b965b48a4854dc29021518a 100644 (file)
@@ -82,7 +82,7 @@ sub mkrun{
                while (my ($fd, $file) = $it->()) {
                        push @args, "--fd=$fd $file";
                }
                while (my ($fd, $file) = $it->()) {
                        push @args, "--fd=$fd $file";
                }
-               execlist $basename, @args, "./$basename"
+               execlist $basename, @args, '--', "./$basename", @{$args{args}}
        }
 }
 
        }
 }
 
@@ -93,10 +93,11 @@ sub prepare{
        try {
                execlist prog => '--fd=1 >>errors', '--fd=2 >>errors', 'gruntmaster-compile', $format, $name;
        } catch {
        try {
                execlist prog => '--fd=1 >>errors', '--fd=2 >>errors', 'gruntmaster-compile', $format, $name;
        } catch {
-               die "Compile error\n"
+               my $exmsg = $_->[1];
+               die "Compile error ($exmsg)\n"
        } finally {
                $Gruntmaster::Daemon::errors .= read_file 'errors';
        } finally {
                $Gruntmaster::Daemon::errors .= read_file 'errors';
-               $Gruntmaster::Daemon::errors .= "\n";
+               $Gruntmaster::Daemon::errors .= "\n" if -s 'errors';
                unlink 'errors';
        };
 }
                unlink 'errors';
        };
 }
This page took 0.010552 seconds and 4 git commands to generate.