knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
PythonError.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_PYTHON_ERROR_H
7 #define KNOWROB_PYTHON_ERROR_H
8 
9 #include "memory"
10 #include "knowrob/KnowRobError.h"
11 
12 namespace knowrob {
18  class PythonError : public KnowRobError {
19  public:
21  protected:
22  // error data parsed from Python
23  struct ErrorData {
28  std::optional<std::string> exc_file;
29  std::optional<int> exc_line;
30  };
32 
33  explicit PythonError(const ErrorData &errorData);
34 
36  };
37 
38 } // knowrob
39 
40 #endif //KNOWROB_PYTHON_ERROR_H
static ErrorData makeErrorData()
PythonError(const ErrorData &errorData)
ErrorData errorData_
Definition: PythonError.h:31
TermRule & string()
Definition: terms.cpp:63
std::optional< std::string > exc_file
Definition: PythonError.h:28
std::optional< int > exc_line
Definition: PythonError.h:29