logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

HTML::HTML5::Parser::Error - an error that occurred during parsing

Author

       Toby Inkster, <tobyink@cpan.org>

Description

       The "error_handler" and "errors" methods of "HTML::HTML5::Parser" generate "HTML::HTML5::Parser::Error"
       objects.

       "HTML::HTML5::Parser::Error" overloads stringification, so can be printed, matched against regular
       expressions, etc.

       Note that HTML::HTML5::Parser is not a validation tool, and there are many classes of error that it does
       not care about, so will not raise.

   Constructor
       "new(level=>$level, type=>$type, token=>$token, ...)"
           Constructs a new "HTML::HTML5::Parser::Error" object.

   Methods
       "level"
           Returns the level of error. ('MUST', 'SHOULD', 'WARN', 'INFO' or undef.)

       "layer"
           Returns the parsing layer involved, often undef. e.g. 'encode'.

       "type"
           Returns the type of error as a string.

       "tag_name"
           Returns the tag name (if any).

       "source_line"
             ($line, $col) = $error->source_line();
             $line = $error->source_line;

           In scalar context, "source_line" returns the line number of the source code that triggered the error.

           In list context, returns a line/column pair. (Tab characters count as one column, not eight.)

       "to_string"
           Returns a friendly error string.

Disclaimer Of Warranties

       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT  ANY  EXPRESS  OR  IMPLIED  WARRANTIES,  INCLUDING,  WITHOUT
       LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

perl v5.36.0                                       2022-08-28                    HTML::HTML5::Parser::Error(3pm)

Name

       HTML::HTML5::Parser::Error - an error that occurred during parsing

See Also

       HTML::HTML5::Parser.

See Also