NuTo
Numerics Tool
Exception.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <stdexcept>
5 
6 namespace NuTo
7 {
9 class Exception : public std::runtime_error
10 {
11 public:
14  explicit Exception(const std::string& message)
15  : std::runtime_error(message)
16  {
17  }
18 
22  explicit Exception(const std::string& caller, const std::string& message)
23  : std::runtime_error(std::string("[") + caller + "]\n" + message)
24  {
25  }
26 };
27 } // namespace NuTo
Base class for all exceptions thrown in NuTo.
Definition: Exception.h:9
Exception(const std::string &caller, const std::string &message)
Constructor.
Definition: Exception.h:22
Definition: Exception.h:6
Exception(const std::string &message)
Constructor.
Definition: Exception.h:14