LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
lf_exception.h
1
9#ifndef __d0efe6ebb86049268fc644633590ed83
10#define __d0efe6ebb86049268fc644633590ed83
11#include <exception>
12#include <string>
13#include <utility>
14
15namespace lf::base {
16
21class LfException : public std::exception {
22 public:
27 explicit LfException(std::string what) : what_(std::move(what)) {}
28
29 [[nodiscard]] char const* what() const noexcept override {
30 return what_.c_str();
31 }
32
33 private:
34 std::string what_;
35};
36
37} // namespace lf::base
38
39#endif // __d0efe6ebb86049268fc644633590ed83
A simple, general purpose exception class that is thrown by LehrFEM++ if something is wrong.
Definition: lf_exception.h:21
char const * what() const noexcept override
Definition: lf_exception.h:29
LfException(std::string what)
Create a new LfException with an error message.
Definition: lf_exception.h:27
Contains basic functionality that is used by other parts of LehrFEM++.
Definition: base.h:15