@@ -76,10 +76,37 @@ namespace libsemigroups {
7676 formatted_error_message (e).c_str ());
7777 }
7878 });
79- // TODO: Doc
79+
8080 m.def (" error_message_with_prefix" ,
81- py::overload_cast<>(&error_message_with_prefix));
81+ py::overload_cast<>(&error_message_with_prefix),
82+ R"pbdoc(
83+ Return whether :any:`LibsemigroupsError` messages have a C++ prefix.
84+
85+ Since ``libsemigroups_pybind11`` is built on top of the C++ library
86+ ``libsemigroups``, many of the errors thrown in ``libsemigroups_pybind11``
87+ emanate from a C++ function. This function returns whether
88+ :any:`LibsemigroupsError` messages contain a prefix that indicates which C++
89+ function raised the exception.
90+
91+ :return: Whether :any:`LibsemigroupsError` messages contain a prefix about the
92+ C++ function that raised the exception.
93+ :rtype: bool
94+ )pbdoc" );
8295 m.def (" error_message_with_prefix" ,
83- py::overload_cast<bool >(&error_message_with_prefix));
96+ py::overload_cast<bool >(&error_message_with_prefix),
97+ py::arg (" val" ),
98+ R"pbdoc(
99+ Specify whether :any:`LibsemigroupsError` messages have a C++ prefix.
100+
101+ Since ``libsemigroups_pybind11`` is built on top of the C++ library
102+ ``libsemigroups``, many of the errors thrown in ``libsemigroups_pybind11``
103+ emanate from a C++ function. This function specifies whether
104+ :any:`LibsemigroupsError` messages should contain a prefix that indicates which
105+ C++ function raised the exception. By default, this information is not included.
106+
107+ :param val: Whether :any:`LibsemigroupsError` messages should contain a prefix
108+ about the C++ function that raised the exception.
109+ :type val: bool
110+ )pbdoc" );
84111 }
85112} // namespace libsemigroups
0 commit comments