MCPcopy Create free account
hub / github.com/LeelaChessZero/lc0 / GenerateHandle

Method GenerateHandle

scripts/pybind/exceptions.py:48–52  ·  view source on GitHub ↗
(self, w, func)

Source from the content-addressed store, hash-verified

46 f'{self.type_struct_name()});')
47
48 def GenerateHandle(self, w, func):
49 w.Unindent()
50 w.Open(f'}} catch (const {self.cpp_name} &ex) {{')
51 w.Write(f'PyErr_SetString({self.type_struct_name()}, ex.what());')
52 w.Write(f'return {func._failure()};')

Callers 1

_handle_exceptionsMethod · 0.80

Calls 5

type_struct_nameMethod · 0.95
OpenMethod · 0.80
UnindentMethod · 0.45
WriteMethod · 0.45
_failureMethod · 0.45

Tested by

no test coverage detected