LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
lf_exception.h
1
9#ifndef INCGd0efe6ebb86049268fc644633590ed83
10#define INCGd0efe6ebb86049268fc644633590ed83
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 // INCGd0efe6ebb86049268fc644633590ed83
A simple, general purpose exception class that is thrown by LehrFEM++ if something is wrong.
char const * what() const noexcept override
LfException(std::string what)
Create a new LfException with an error message.
Contains basic functionality that is used by other parts of LehrFEM++.
Definition base.h:15