www.mooseframework.org
MooseException.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include <exception>
13 
17 class MooseException : public std::exception
18 {
19 public:
23  MooseException(std::string message) : _message(message) {}
24 
32  ~MooseException() throw() {}
33 
39  virtual const char * what() const throw() { return _message.c_str(); }
40 
41 protected:
42  std::string _message;
43 };
44 
virtual const char * what() const
Get out the error message.
MooseException(std::string 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...