Index: trunk/tools/errors.pl
===================================================================
--- trunk/tools/errors.pl	(revision 27190)
+++ trunk/tools/errors.pl	(revision 27191)
@@ -50,5 +50,7 @@
 } elsif ($stage eq "stack") {
     $sql = "SELECT stack_id, 'stack', hostname, path_base FROM stackRun JOIN stackSumSkyfile USING(stack_id) WHERE fault != 0";
-} else {
+} elsif ($stage eq "warp") {
+    $sql = "SELECT warp_id, skycell_id, hostname, path_base FROM warpRun JOIN warpSkyfile USING(warp_id) WHERE fault != 0";
+}else {
     die "Unsupported stage: $stage\n";
 }
@@ -70,4 +72,7 @@
 my %unable_access;
 my %statistics_file;
+my %transparencies;
+my %couldnt_open_file;
+my %failed_read;
 my %unknown;
 my %bad;
@@ -93,40 +98,57 @@
     }
 
-    my $file;
+    my $file;                   # Log file
     open $file, $log;
-    my $found = 0;              # Found something interesting
-    while (<$file>) {
-        if (/Assertion .* failed/ or /Assertion failed in/) {
+    my @log = <$file>;          # Contents of log file
+    close $file;
+    my $line;                   # Line from file
+    my $found;                  # Found something?
+    while (($line = pop @log)) {
+        if ($line =~ /Assertion .* failed/ or $line =~ /Assertion failed in/) {
             $assertion{$name} = $log;
             $found = 1;
             last;
         }
-        if (/Cannot find file (\S+)/) {
+        if ($line =~ /Cannot find file (\S+)/) {
             $cannot_find_file{$name} = $1;
             $found = 1;
             last;
         }
-        if (/Unable to access file (\S+)/) {
+        if ($line =~ /Unable to access file (\S+)/) {
             $unable_access{$name} = $1;
             $found = 1;
             last;
         }
-        if (/failed to determine real name from template for (\S+)/) {
+        if ($line =~ /failed to determine real name from template for (\S+)/) {
             $failed_real_name{$name} = $1;
             $found = 1;
             last;
         }
-        if (/failed to close (\S+)/) {
+        if ($line =~ /failed to close (\S+)/) {
             $failed_close{$name} = $1;
             $found = 1;
             last;
         }
-        if (/Unable to open statistics file/) {
+        if ($line =~ /Unable to open statistics file/) {
             $statistics_file{$name} = $log;
             $found = 1;
             last;
         }
-    }
-    close $file;
+        if ($line =~ /Unable to perform statistics on transparencies./) {
+            $transparencies{$name} = $log;
+            $found = 1;
+            last;
+        }
+        if ($line =~ /Could not open file,(\S+)/) {
+            $couldnt_open_file{$name} = $1;
+            $found = 1;
+            last;
+        }
+        if ($line =~ /failed to read (\S+)/) {
+            $failed_read{$name} = $1;
+            $found = 1;
+            last;
+        }
+    }
     $unknown{$name} = $log unless $found;
 }
@@ -136,43 +158,81 @@
 print "\n";
 
-print "Assertion failures: " . ( scalar keys %assertion ) . "\n";
-foreach my $name (keys %assertion) {
-    print "$name: $assertion{$name}\n";
-}
-print "\n";
-
-print "'Cannot find file' errors: " . ( scalar keys %cannot_find_file ) . "\n";
-foreach my $name (keys %cannot_find_file) {
-    print "$name: $cannot_find_file{$name}\n";
-}
-print "\n";
-
-print "'Unable to access file' errors: " . ( scalar keys %unable_access ) . "\n";
-foreach my $name (keys %unable_access) {
-    print "$name: $unable_access{$name}\n";
-}
-print "\n";
-
-print "'Failed to determine real name' errors: " . ( scalar keys %failed_real_name ) . "\n";
-foreach my $name (keys %failed_real_name) {
-    print "$name: $failed_real_name{$name}\n";
-}
-print "\n";
-
-print "'Failed to close' errors: " . ( scalar keys %failed_close ) . "\n";
-foreach my $name (keys %failed_close) {
-    print "$name: $failed_close{$name}\n";
-}
-print "\n";
-
-print "Unknown errors: " . ( scalar keys %unknown ) . "\n";
-foreach my $name (keys %unknown) {
-    print "$name: $unknown{$name}\n";
-}
-print "\n";
-
-print "Bad logs: " . ( scalar keys %bad ) . "\n";
-foreach my $name (keys %bad) {
-    print "$name: $bad{$name}\n";
-}
-print "\n";
+if (scalar keys %assertion) {
+    print "Assertion failures: " . ( scalar keys %assertion ) . "\n";
+    foreach my $name (keys %assertion) {
+        print "$name: $assertion{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %cannot_find_file) {
+    print "'Cannot find file' errors: " . ( scalar keys %cannot_find_file ) . "\n";
+    foreach my $name (keys %cannot_find_file) {
+        print "$name: $cannot_find_file{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %unable_access) {
+    print "'Unable to access file' errors: " . ( scalar keys %unable_access ) . "\n";
+    foreach my $name (keys %unable_access) {
+        print "$name: $unable_access{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %failed_real_name) {
+    print "'Failed to determine real name' errors: " . ( scalar keys %failed_real_name ) . "\n";
+    foreach my $name (keys %failed_real_name) {
+        print "$name: $failed_real_name{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %failed_close) {
+    print "'Failed to close' errors: " . ( scalar keys %failed_close ) . "\n";
+    foreach my $name (keys %failed_close) {
+        print "$name: $failed_close{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %transparencies) {
+    print "'Unable to perform statistics on transparencies' errors: " . ( scalar keys %transparencies ) . "\n";
+    foreach my $name (keys %transparencies) {
+        print "$name: $transparencies{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %couldnt_open_file) {
+    print "'Could not open file' errors: " . ( scalar keys %couldnt_open_file ) . "\n";
+    foreach my $name (keys %couldnt_open_file) {
+        print "$name: $couldnt_open_file{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %failed_read) {
+    print "'failed to read' errors: " . ( scalar keys %failed_read ) . "\n";
+    foreach my $name (keys %failed_read) {
+        print "$name: $failed_read{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %unknown) {
+    print "Unknown errors: " . ( scalar keys %unknown ) . "\n";
+    foreach my $name (keys %unknown) {
+        print "$name: $unknown{$name}\n";
+    }
+    print "\n";
+}
+
+if (scalar keys %bad) {
+    print "Bad logs: " . ( scalar keys %bad ) . "\n";
+    foreach my $name (keys %bad) {
+        print "$name: $bad{$name}\n";
+    }
+    print "\n";
+}
