A type that should be translated to a standard Python exception
| 33 | |
| 34 | // A type that should be translated to a standard Python exception |
| 35 | class MyException2 : public std::exception { |
| 36 | public: |
| 37 | explicit MyException2(const char *m) : message{m} {} |
| 38 | const char *what() const noexcept override { return message.c_str(); } |
| 39 | |
| 40 | private: |
| 41 | std::string message = ""; |
| 42 | }; |
| 43 | |
| 44 | // A type that is not derived from std::exception (and is thus unknown) |
| 45 | class MyException3 { |
no outgoing calls