diff options
Diffstat (limited to 'include/exceptions.hpp')
-rw-r--r-- | include/exceptions.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/exceptions.hpp b/include/exceptions.hpp index 0469784..4b5fcfa 100644 --- a/include/exceptions.hpp +++ b/include/exceptions.hpp @@ -1,4 +1,9 @@ +/* PIA - Lenguajes Modernos de Programación + * FACULTAD DE CIENCIAS FÍSICO MATEMÁTICAS + * Luis Sebastián Martínez Vega - LCC */ + #include <string> + #ifndef EXCEPTIONS_H #define EXCEPTIONS_H @@ -6,18 +11,18 @@ class Exception{ private: std::string error_msg; public: - Exception(const std::string &error_msg); + explicit Exception(const std::string &error_msg): error_msg(error_msg){} std::string showMsg(); }; class LexerException: public Exception{ public: - LexerException(const std::string &error_msg): Exception(error_msg){} + explicit LexerException(const std::string &error_msg): Exception(error_msg){} }; class ParserException: public Exception{ public: - ParserException(const std::string &error_msg): Exception(error_msg){} + explicit ParserException(const std::string &error_msg): Exception(error_msg){} }; #endif /* EXCEPTIONS_H */ |