UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
GenericMessageException.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef GENERICMESSAGEEXCEPTION_H_
21 #define GENERICMESSAGEEXCEPTION_H_
22 
23 #include <exception>
24 #include "../basic_types/globals.h"
25 
26 namespace uncover {
27  namespace basic_types {
28 
33  class GenericMessageException : public std::exception {
34 
35  public:
36 
40  virtual ~GenericMessageException() throw();
41 
46  virtual const char* what() const throw() override;
47 
54  friend std::ostream& operator<< (std::ostream& ost, GenericMessageException& data);
55 
56  protected:
57 
63  GenericMessageException(string exceptionName, string messageBody);
64 
69 
70  };
71 
72  } /* namespace exceptions */
73 } /* namespace uncover */
74 
75 #endif /* GENERICMESSAGEEXCEPTION_H_ */
GenericMessageException(string exceptionName, string messageBody)
Creates a new GenericMessageException form the input text.
Definition: GenericMessageException.cpp:26
virtual ~GenericMessageException()
Destroys the GenericMessageException instance.
Definition: GenericMessageException.cpp:29
virtual const char * what() const override
Returns a string representation of the exception.
Definition: GenericMessageException.cpp:31
string exceptionMessage
Stores the message of the exception.
Definition: GenericMessageException.h:68
friend std::ostream & operator<<(std::ostream &ost, GenericMessageException &data)
Streams the string representation of the exception using the given ostream.
Definition: GenericMessageException.cpp:35
This class serves as a superclass of all Exceptions.
Definition: GenericMessageException.h:33