CVC4::parser::ParserException Class Reference

`#include <parser_exception.h>`

Inheritance diagram for CVC4::parser::ParserException:
[legend]
Collaboration diagram for CVC4::parser::ParserException:
[legend]

## Public Member Functions

| ParserException () throw ()
| ParserException (const std::string &msg) throw ()
| ParserException (const char *msg) throw ()
| ParserException (const std::string &msg, const std::string &filename, unsigned long line, unsigned long column) throw ()
virtual | ~ParserException () throw ()
virtual void | toStream (std::ostream &os) const throw ()
| Printing: feel free to redefine toStream().
std::string | getFilename () const throw ()
int | getLine () const throw ()
int | getColumn () const throw ()
void | setMessage (const std::string &msg) throw ()
std::string | getMessage () const throw ()
virtual const char * | what () const throw ()
std::string | toString () const throw ()
| Get this exception as a string.

## Protected Attributes

std::string | d_filename
unsigned long | d_line
unsigned long | d_column
std::string | d_msg

## Detailed Description

Definition at line 31 of file parser_exception.h.

## Constructor & Destructor Documentation

## ParserException() [1/4]

CVC4::parser::ParserException::ParserException | ( |  | ) |
throw | ( | ) |  |  |

inline

Definition at line 34 of file parser_exception.h.

## ParserException() [2/4]

CVC4::parser::ParserException::ParserException | ( | const std::string & | msg | ) |
throw | ( | ) |  |  |

inline

Definition at line 40 of file parser_exception.h.

## ParserException() [3/4]

CVC4::parser::ParserException::ParserException | ( | const char * | msg | ) |
throw | ( | ) |  |  |

inline

Definition at line 47 of file parser_exception.h.

## ParserException() [4/4]

CVC4::parser::ParserException::ParserException | ( | const std::string & | msg,
|  | const std::string & | filename,
|  | unsigned long | line,
|  | unsigned long | column )
throw | ( | ) |  |  |

inline

Definition at line 54 of file parser_exception.h.

## ~ParserException()

virtual CVC4::parser::ParserException::~ParserException | ( |  | ) |
throw | ( | ) |  |  |

inlinevirtual

Definition at line 63 of file parser_exception.h.

## Member Function Documentation

## getColumn()

int CVC4::parser::ParserException::getColumn | ( |  | ) | const
throw | ( | ) |  |  |

inline

Definition at line 82 of file parser_exception.h.

## getFilename()

std::string CVC4::parser::ParserException::getFilename | ( |  | ) | const
throw | ( | ) |  |  |

inline

Definition at line 74 of file parser_exception.h.

## getLine()

int CVC4::parser::ParserException::getLine | ( |  | ) | const
throw | ( | ) |  |  |

inline

Definition at line 78 of file parser_exception.h.

## getMessage()

std::string CVC4::Exception::getMessage | ( |  | ) | const
throw | ( | ) |  |  |

inlineinherited

Definition at line 47 of file exception.h.

## setMessage()

void CVC4::Exception::setMessage | ( | const std::string & | msg | ) |
throw | ( | ) |  |  |

inlineinherited

Definition at line 46 of file exception.h.

## toStream()

virtual void CVC4::parser::ParserException::toStream | ( | std::ostream & | os | ) | const
throw | ( | ) |  |  |

inlinevirtual

Printing: feel free to redefine toStream().

When overridden in a derived class, it's recommended that this method print the type of exception before the actual message.

Reimplemented from CVC4::Exception.

Definition at line 65 of file parser_exception.h.

## toString()

std::string CVC4::Exception::toString | ( |  | ) | const
throw | ( | ) |  |  |

inlineinherited

Get this exception as a string.

Note that cout << ex.toString(); is subtly different from cout << ex; which is equivalent to ex.toStream(cout); That is because with the latter two, the output language (and other preferences) for exprs on the stream is respected. In toString(), there is no stream, so the parameters are default and you'll get exprs and types printed using the AST language.

Definition at line 64 of file exception.h.

## what()

virtual const char * CVC4::Exception::what | ( |  | ) | const
throw | ( | ) |  |  |

inlinevirtualinherited

Definition at line 50 of file exception.h.

## Field Documentation

## d_column

unsigned long CVC4::parser::ParserException::d_column

protected

Definition at line 89 of file parser_exception.h.

## d_filename

std::string CVC4::parser::ParserException::d_filename

protected

Definition at line 87 of file parser_exception.h.

## d_line

unsigned long CVC4::parser::ParserException::d_line

protected

Definition at line 88 of file parser_exception.h.

## d_msg

std::string CVC4::Exception::d_msg

protectedinherited

Definition at line 34 of file exception.h.

The documentation for this class was generated from the following file:

- src/parser/parser_exception.h