MCPcopy
hub / github.com/redis/redis-py / _annotate_exception

Method _annotate_exception

redis/asyncio/cluster.py:2511–2520  ·  view source on GitHub ↗

Provides extra context to the exception prior to it being handled

(self, exception, number, command)

Source from the content-addressed store, hash-verified

2509 return self._pipe
2510
2511 def _annotate_exception(self, exception, number, command):
2512 """
2513 Provides extra context to the exception prior to it being handled
2514 """
2515 cmd = " ".join(map(safe_str, command))
2516 msg = (
2517 f"Command # {number} ({truncate_text(cmd)}) of pipeline "
2518 f"caused error: {exception.args[0]}"
2519 )
2520 exception.args = (msg,) + exception.args[1:]
2521
2522 @abstractmethod
2523 def mset_nonatomic(

Callers 2

_raise_first_errorMethod · 0.80
_execute_transactionMethod · 0.80

Calls 1

truncate_textFunction · 0.90

Tested by

no test coverage detected