The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Text::Parser::Errors - Exceptions for Text::Parser

VERSION

version 0.925

DESCRIPTION

This document contains a manifest of all the exception classes thrown by Text::Parser.

EXCEPTION CLASSES

All exceptions are derived from Text::Parser::Errors::GenericError. They are all based on Throwable::SugarFactory and so all the exception methods of those, such as error, namespace, etc., will be accessible. Read Exceptions if you don't know about exceptions in Perl 5.

Text::Parser::Errors::InvalidFilename

Thrown when file name specified to read or filename is invalid.

Attributes

  • name - a string with the anticipated file name.

Text::Parser::Errors::FileNotReadable

Thrown when file name specified to read or filename has no read permissions or is unreadable for any other reason.

Attributes

  • name - a string with the name of the file that could not be read

Text::Parser::Errors::FileNotPlainText

Thrown when file name specified to read or filename is not a plain text file.

Attributes

  • name - a string with the name of the non-text input file

  • mime_type - undef for now. This is reserved for future.

Errors in multiline_type parsers

Text::Parser::Errors::UnexpectedEof

Thrown when a line continuation character indicates that the last line in the file is wrapped on to the next line.

Attributes

  • discontd - a string containing the line with the continuation character.

  • line_num - line number at which the unexpected EOF is encountered.

Text::Parser::Errors::UnexpectedCont

Thrown when a line continuation character on the first line indicates that it is a continuation of a previous line.

Attributes

  • line - a string containing the content of the line with the unexpected continuation character.

Text::Parser::Errors::ExAWK

All errors corresponding to the Text::Parser::Rule class.

Text::Parser::Errors::BadRuleSyntax

Generated from Text::Parser::Rule class constructor or from the accessors of condition, action, or the method add_precondition, when the rule strings specified fail to compile properly.

Attributes

  • code - the original rule string

  • msg - content of $@ after eval

  • subroutine - stringified form of the subroutine generated from the given code.

Text::Parser::Errors::IllegalRuleNoIfNoAct

Generated from constructor of the Text::Parser::Rule when the rule is created with neither a condition nor an action

Text::Parser::Errors::IllegalRuleCont

Generated when the rule option continue_to_next of the Text::Parser::Rule object is set true when dont_record is false.

Text::Parser::Errors::RuleRunImproperly

Generated from run method of Text::Parser::Rule is called without an object of Text::Parser as argument.

SEE ALSO

BUGS

Please report any bugs or feature requests on the bugtracker website http://github.com/balajirama/Text-Parser/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Balaji Ramasubramanian <balajiram@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018-2019 by Balaji Ramasubramanian.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.