Module Fehu.Errors Source Error types and exception handling for environments.
Error types for the Fehu reinforcement learning framework.
This module defines the error hierarchy for environment operations, validation, and registration. All framework-specific errors use the Error exception with structured error variants for precise error handling.
Source type t = | Unregistered_env of stringEnvironment ID not found in registry
| Namespace_not_found of stringEnvironment namespace doesn't exist
| Name_not_found of stringEnvironment name not found in namespace
| Version_not_found of stringEnvironment version not available
| Deprecated_env of stringEnvironment is deprecated
| Registration_error of stringEnvironment registration failed
| Dependency_not_installed of stringRequired dependency missing
| Unsupported_mode of stringRequested mode not supported
| Invalid_metadata of stringMetadata validation failed
| Reset_needed of stringEnvironment requires reset before step
| Invalid_action of stringAction outside valid space
| Missing_argument of stringRequired argument not provided
| Invalid_probability of stringProbability value out of 0, 1 range
| Invalid_bound of stringBound constraint violated
| Closed_environment of stringOperation on closed environment
Error variants covering framework operations.
Each variant includes a descriptive message for debugging.
Framework exception wrapping structured error types.
to_string error converts error to a human-readable message.
Use for logging, error reporting, or user-facing diagnostics.
raise_error error raises the framework exception with error.
Equivalent to raise (Error error).