Skip to content

Exceptions

ropt.exceptions

Exceptions raised within the ropt library.

ComputeStepAborted

Bases: Exception

Raised when a compute step is aborted prematurely.

This exception signals that an optimization or another compute step could not complete its intended task due to a specific condition (e.g., insufficient valid realizations, user request).

It must be initialized with an ExitCode indicating the reason for the abortion.

__init__

__init__(exit_code: ExitCode) -> None

Initialize the ComputeStepAborted exception.

Stores the reason for the abortion, which can be accessed via the exit_code attribute.

Parameters:

Name Type Description Default
exit_code ExitCode

The code indicating why the compute step was aborted.

required