MCPcopy Create free account
hub / github.com/pybind/pybind11 / matches

Function matches

include/pybind11/pytypes.h:796–796  ·  view source on GitHub ↗

Check if the currently trapped error type matches the given Python exception class (or a subclass thereof). May also be passed a tuple to search for any exception class matches in the given tuple.

Source from the content-addressed store, hash-verified

794 /// subclass thereof). May also be passed a tuple to search for any exception class matches in
795 /// the given tuple.
796 bool matches(handle exc) const { return m_fetched_error->matches(exc); }
797
798 const object &type() const { return m_fetched_error->m_type; }
799 const object &value() const { return m_fetched_error->m_value; }

Callers

nothing calls this directly

Calls 1

matchesMethod · 0.80

Tested by

no test coverage detected