creates exception objects with a message for the object to display when thrown More...
#include <Exceptions.h>
Public Member Functions | |
| Exceptions (const std::string &newMessage) | |
| Exceptions constructor. | |
| Exceptions (const int &Error_index, const std::string &filePath, const int &lnNum, const int ¤t_index, const std::string ¤t_char) | |
| Exceptions constructor. | |
| Exceptions (const int &Error_index, const std::string &filePath, const int &lnNum, const int ¤t_index, const std::string ¤t_char, const std::string &number_str) | |
| Exceptions constructor. | |
| std::string | getMessage () |
| gets the message that was created or stored when the exception was created and thrown | |
Private Member Functions | |
| std::string | makeSpaces (const int &length) |
| makes empty spaces eg ' ', of a specified length and returns a string with these spaces | |
| std::string | createErrorMessage (const int &Error_index) |
| determines which error message must be thrown depending on the index passed in which corresponds to the index's in the enum 'EXCEPTIONS_MSG' | |
Private Attributes | |
| std::string | message |
| stores the message to display when exception is thrown | |
| std::string | filePath |
| name of the file where exception was thrown from | |
| int | lnNum |
| line where exception was thrown from | |
| int | current_index |
| index where exception was thrown from | |
| std::string | current_char |
| the character which caused an exception to be thrown | |
| std::string | number_str |
| (optional) if an exception was caused by a number, the number which caused an exception to be thrown | |
creates exception objects with a message for the object to display when thrown
creates a node in the syntax tree of type while
node used for creating abstract syntax tree