Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.8

Request #4774 XML_Parser shoud report source column number on errors
Submitted: 2005-07-09 08:22 UTC
From: hartmut at php dot net Assigned: schst
Status: Closed Package: XML_Parser
PHP Version: Irrelevant OS: any
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-09 08:22 UTC] hartmut at php dot net
Description: ------------ Error messages produced by XML_Parser should not only show the line number but also the column position within that line (especially as some XML generating tools seem to hate newlines, producing output that is stuffed into a loooooong single line) Reproduce code: --------------- diff -u -r1.25 Parser.php --- Parser.php 25 Mar 2005 17:13:10 -0000 1.25 +++ Parser.php 9 Jul 2005 08:21:10 -0000 @@ -673,12 +673,14 @@ { if (is_resource($msgorparser)) { $code = xml_get_error_code($msgorparser); - $msgorparser = sprintf('%s at XML input line %d', + $msgorparser = sprintf('%s at XML input line %d:%d', xml_error_string($code), - xml_get_current_line_number($msgorparser)); + xml_get_current_line_number($msgorparser), + xml_get_current_column_number($msgorparser)); } $this->PEAR_Error($msgorparser, $code, $mode, $level); } // }}} }

Comments

 [2005-09-23 11:51 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!