From 14b375123c0ee2c1ce2d5e6e327e386672dc212a Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Wed, 13 Jan 2021 23:14:45 -0500 Subject: [PATCH] docs: fix example code in Exceptions section (match vs. matches) (#2781) --- docs/advanced/exceptions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;