MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _convert_exception

Function _convert_exception

pymongo/message.py:139–141  ·  view source on GitHub ↗

Convert an Exception into a failure document for publishing.

(exception: Exception)

Source from the content-addressed store, hash-verified

137
138
139def _convert_exception(exception: Exception) -> dict[str, Any]:
140 """Convert an Exception into a failure document for publishing."""
141 return {"errmsg": str(exception), "errtype": exception.__class__.__name__}
142
143
144def _convert_client_bulk_exception(exception: Exception) -> dict[str, Any]:

Callers 10

write_commandMethod · 0.90
unack_writeMethod · 0.90
run_operationMethod · 0.90
write_commandMethod · 0.90
unack_writeMethod · 0.90
write_commandMethod · 0.90
unack_writeMethod · 0.90
run_operationMethod · 0.90
write_commandMethod · 0.90
unack_writeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected