The errors.py module#

Summary#

GeometryRuntimeError

Provides error message when Geometry service passes a runtime error.

GeometryExitedError

Provides error message to raise when Geometry service has exited.

handler

Pass signal to the custom interrupt handler.

protect_grpc

Capture gRPC exceptions and raise a more succinct error message.

Description#

Provides PyAnsys Geometry-specific errors.

Module detail#

errors.handler(sig, frame)#

Pass signal to the custom interrupt handler.

errors.protect_grpc(func)#

Capture gRPC exceptions and raise a more succinct error message.

This method captures the KeyboardInterrupt exception to avoid segfaulting the Geometry service.

While this works some of the time, it does not work all of the time. For some reason, gRPC still captures SIGINT.

errors.SIGINT_TRACKER = []#