www.mooseframework.org
MooseException.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef MOOSEEXCEPTION_H
16 #define MOOSEEXCEPTION_H
17 
18 #include <exception>
19 
23 class MooseException : public std::exception
24 {
25 public:
29  MooseException(std::string message) : _message(message) {}
30 
38  ~MooseException() throw() {}
39 
45  virtual const char * what() const throw() { return _message.c_str(); }
46 
47 protected:
48  std::string _message;
49 };
50 
51 #endif /* MOOSEEXCEPTION_H */
MooseException(std::string message)
virtual const char * what() const
Get out the error message.
Provides a way for users to bail out of the current solve.
std::string _message
~MooseException()
For some reason, on GCC 4.6.3, I get &#39;error: looser throw specifier&#39; when deriving from std::exceptio...