W3C home > Mailing lists > Public > www-validator-cvs@w3.org > December 2009

validator/httpd/cgi-bin check,1.747,1.748

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 12 Dec 2009 11:15:15 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NJPwR-0008Oe-RJ@lionel-hutz.w3.org>
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv32189/httpd/cgi-bin

Modified Files:
	check 
Log Message:
Include error message in output when something goes wrong when interfacing with external validators (#5992 comment 13).

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.747
retrieving revision 1.748
diff -u -d -r1.747 -r1.748
--- check	11 Dec 2009 18:40:24 -0000	1.747
+++ check	12 Dec 2009 11:15:13 -0000	1.748
@@ -1057,6 +1057,7 @@
         my $tmpl = &get_template($File, 'fatal-error.tmpl');
         $tmpl->param(fatal_no_checker      => TRUE);
         $tmpl->param(fatal_missing_checker => 'HTML5 Validator');
+        $tmpl->param(fatal_checker_error   => $res->status_line());
     }
     else {
         my $content = &get_content($File, $res);
@@ -1071,10 +1072,12 @@
         my $xmlDOM;
         eval { $xmlDOM = $xml_reader->parse_string($content); };
         if ($@) {
+            my $errmsg = $@;
             $File->{'Error Flagged'} = TRUE;
             my $tmpl = &get_template($File, 'fatal-error.tmpl');
             $tmpl->param(fatal_no_checker      => TRUE);
             $tmpl->param(fatal_missing_checker => 'HTML5 Validator');
+            $tmpl->param(fatal_checker_error   => $errmsg);
             return $File;
         }
         my @nodelist      = $xmlDOM->getElementsByTagName("messages");
@@ -1213,6 +1216,7 @@
         my $tmpl = &get_template($File, 'fatal-error.tmpl');
         $tmpl->param(fatal_no_checker      => TRUE);
         $tmpl->param(fatal_missing_checker => 'HTML5 Validator');
+        $tmpl->param(fatal_checker_error   => $res->status_line());
     }
     else {
         my $content = &get_content($File, $res);
@@ -1227,10 +1231,12 @@
         my $xmlDOM;
         eval { $xmlDOM = $xml_reader->parse_string($content); };
         if ($@) {
+            my $errmsg = $@;
             $File->{'Error Flagged'} = TRUE;
             my $tmpl = &get_template($File, 'fatal-error.tmpl');
             $tmpl->param(fatal_no_checker      => TRUE);
             $tmpl->param(fatal_missing_checker => 'HTML5 Validator');
+            $tmpl->param(fatal_checker_error   => $errmsg);
             return $File;
         }
         my @nodelist      = $xmlDOM->getElementsByTagName("messages");
Received on Saturday, 12 December 2009 11:15:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:16 GMT