MCPcopy Index your code
hub / github.com/python/mypy / error

Method error

mypyc/codegen/emitwrapper.py:957–964  ·  view source on GitHub ↗

Figure out how to deal with errors in the wrapper.

(self)

Source from the content-addressed store, hash-verified

955 # TODO: Tracebacks?
956
957 def error(self) -> ErrorHandler:
958 """Figure out how to deal with errors in the wrapper."""
959 if self.cleanups or self.traceback_code:
960 # We'll have a label at the end with error handling code.
961 return GotoHandler("fail")
962 else:
963 # Nothing special needs to done to handle errors, so just return.
964 return ReturnHandler("NULL")
965
966 def emit_error_handling(self) -> None:
967 """Emit error handling block at the end of the wrapper, if needed."""

Callers 1

emit_arg_processingMethod · 0.95

Calls 2

GotoHandlerClass · 0.90
ReturnHandlerClass · 0.90

Tested by

no test coverage detected