A type that should be raised as an exception in Python
| 19 | |
| 20 | // A type that should be raised as an exception in Python |
| 21 | class MyException : public std::exception { |
| 22 | public: |
| 23 | explicit MyException(const char *m) : message{m} {} |
| 24 | const char *what() const noexcept override { return message.c_str(); } |
| 25 | |
| 26 | private: |
| 27 | std::string message = ""; |
| 28 | }; |
| 29 | |
| 30 | class MyExceptionUseDeprecatedOperatorCall : public MyException { |
| 31 | using MyException::MyException; |
no outgoing calls