ParserException

Base class for all Parser exceptions. If thrown, API objects can still be used


class ParserException : public cvc5::CVC5ApiException

Base class for all Parser exceptions. If thrown, API objects can still be used

Subclassed by cvc5::parser::ParserEndOfFileException

Public Functions

ParserException()

Default constructor

ParserException(const std::string &msg)

Construct with message from a string.

Parameters:

msg – The error message.

ParserException(const char *msg)

Construct with message from a C string.

Parameters:

msg – The error message.

ParserException(const std::string &msg, const std::string &filename, unsigned long line, unsigned long column)

Construct with message from a string.

Parameters:
  • msg – The error message.

  • filename – name of the file.

  • line – The error line number.

  • column – The error column number.

virtual void toStream(std::ostream &os) const override

Print error to output stream.

Parameters:

os – The output stream to write the error on.

std::string getFilename() const
Returns:

The file name.

unsigned long getLine() const
Returns:

The line number of the parsing error.

unsigned long getColumn() const
Returns:

The column number of the parsing error.