Skip to content

InvalidParameterError

Module: strata.utils • Kind: struct • Traits: Copyable, Movable, Writable
Source: strata/exceptions/errors.mojo

struct InvalidParameterError(Copyable, Movable, Writable)
from strata.utils import InvalidParameterError

Exception raised when an invalid hyperparameter value is supplied.


Method Description
InvalidParameterError.error() Create a formatted InvalidParameterError message.
InvalidParameterError.write_to() Format a human-readable string representation to a writer.

def error(param_name: String, reason: String) -> Error

Create a formatted InvalidParameterError message.

Parameter Type Description
param_name String —
reason String —

Returns: Error


def write_to(self, mut writer: Some[Writer])

Format a human-readable string representation to a writer.