diff --git a/docs/advanced/exceptions.rst b/docs/advanced/exceptions.rst index 32ea69955..7a4d6cbc6 100644 --- a/docs/advanced/exceptions.rst +++ b/docs/advanced/exceptions.rst @@ -196,7 +196,7 @@ For example: } catch (py::error_already_set &e) { if (e.matches(PyExc_FileNotFoundError)) { py::print("missing.txt not found"); - } else if (e.match(PyExc_PermissionError)) { + } else if (e.matches(PyExc_PermissionError)) { py::print("missing.txt found but not accessible"); } else { throw;