MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / translate_exceptions_

Function translate_exceptions_

tortoise/backends/sqlite/client.py:41–47  ·  view source on GitHub ↗
(self, query, *args)

Source from the content-addressed store, hash-verified

39def translate_exceptions(func: FuncType) -> FuncType:
40 @wraps(func)
41 async def translate_exceptions_(self, query, *args) -> T:
42 try:
43 return await func(self, query, *args)
44 except sqlite3.OperationalError as exc:
45 raise OperationalError(exc)
46 except sqlite3.IntegrityError as exc:
47 raise IntegrityError(exc)
48
49 return translate_exceptions_
50

Callers

nothing calls this directly

Calls 2

OperationalErrorClass · 0.90
IntegrityErrorClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…