.. index:: py::builtins::BaseException::BaseException .. _doxycast_pypp_classpy_1_1builtins_1_1BaseException_1a73731dabf34aef69e424c50981d4b730: .. _py-builtins-BaseException-BaseException: *py::builtins::BaseException::*\ BaseException ============================================== .. code-block:: cpp BaseException(); // 1 explicit BaseException(const char* what); // 2 BaseException(const std::string& what); // 3 template 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.