The errors.py module#

Summary#

VersionError

Raises an error when the version of Mechanical is invalid.

MechanicalRuntimeError

Raises an error when Mechanical passes a runtime error.

MechanicalExitedError

Raises an error when Mechanical has exited.

handler

Pass signal to custom interrupt handler.

protect_grpc

Capture gRPC exceptions and return a more succinct error message.

SIGINT_TRACKER

List of SIGINT keyboard interrupts.

Description#

PyMechanical-specific errors.

Module detail#

errors.handler(sig, frame)#

Pass signal to custom interrupt handler.

errors.protect_grpc(func)#

Capture gRPC exceptions and return a more succinct error message.

Capture KeyboardInterrupt to avoid segfaulting Mechanical.

This works some of the time, but not all the time. For some reason gRPC still captures SIGINT.

errors.SIGINT_TRACKER = []#

List of SIGINT keyboard interrupts.