| 718 | |
| 719 | template <typename KeyType> |
| 720 | str format_message_key_error(const KeyType &key) { |
| 721 | object py_key; |
| 722 | try { |
| 723 | py_key = cast(key); |
| 724 | } catch (const std::exception &) { |
| 725 | do { // Trick to avoid "empty catch" warning/error. |
| 726 | } while (false); |
| 727 | } |
| 728 | return format_message_key_error_key_object(py_key); |
| 729 | } |
| 730 | |
| 731 | PYBIND11_NAMESPACE_END(detail) |
| 732 |
no test coverage detected