py::builtins::BaseException::BaseException

BaseException();                                        // 1

explicit BaseException(const char* what);               // 2

BaseException(const std::string& what);                 // 3

template <class... args>
BaseException(const args&... what)                      // 4

BaseException(const BaseException& other);              // 5

BaseException(BaseException&& other);                   // 6
  1. Constructs a BaseException with empty explanatory message.

  2. Constructs a BaseException with given explanatory message.

  3. Same as 2.

  4. Constructs a BaseException with given explanatory values.

  5. Constructs a BaseException from another BaseException.

  6. Same as 5.

Note

(1), (2) and (3) are deprecated and will be removed when py::builtins::any_t is implemented. But changes should not break old codes, as after removal (4) will be candidate for all calls to them.

Template parameters

args: The types of explanatory values.

Parameters

what: (1), (2) and (3): explanatory string, (4): explanatory values.

other: Another instance of BaseException.