errors
Classes¶
RSessionError
¶
Bases: RuntimeError
Error raised when a worker call fails.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Human-readable error message (often derived from R error messages). |
required |
remote_traceback
|
str or None
|
Best-effort traceback text from the worker process. For R errors this may be an R traceback string; for Python errors inside the worker it may be a Python traceback. |
None
|
Notes
This exception type is designed to preserve the remote failure context while keeping the main process free of rpy2/R state.
RWorkerCrashedError
¶
Bases: RuntimeError
Raised when the R worker process crashes during an operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Human-readable description of the failure. |
required |
recovered
|
bool
|
Indicates whether a fresh worker session was successfully started.
|
required |
cause
|
BaseException
|
The original exception that triggered the crash. Stored as |
None
|
Usage
In user code or automated pipelines, you can distinguish between a recoverable and unrecoverable crash:
Notes
All crashes automatically produce a new exception that wraps the original
failure using Python's exception chaining (raise ... from cause).
Inspect err.__cause__ for the underlying system error.