| 23 | namespace BT |
| 24 | { |
| 25 | class BehaviorTreeException : public std::exception |
| 26 | { |
| 27 | public: |
| 28 | BehaviorTreeException(std::string_view message) |
| 29 | : message_(static_cast<std::string>(message)) |
| 30 | {} |
| 31 | |
| 32 | template <typename... SV> |
| 33 | BehaviorTreeException(const SV&... args) : message_(StrCat(args...)) |
| 34 | {} |
| 35 | |
| 36 | const char* what() const noexcept |
| 37 | { |
| 38 | return message_.c_str(); |
| 39 | } |
| 40 | |
| 41 | private: |
| 42 | std::string message_; |
| 43 | }; |
| 44 | |
| 45 | // This errors are usually related to problems which "probably" require code refactoring |
| 46 | // to be fixed. |
no outgoing calls
no test coverage detected