pyhs3.exceptions

Exception classes for pyhs3.

Custom exception hierarchy for better error handling and debugging.

Functions

custom_error_msg(custom_messages)

Customize an error message for pydantic validation errors.

Exceptions

AnalysisParameterError(message, parameters)

Base for errors that name parameters an analysis must fix before its model builds.

DuplicateEntityError

Raised when two distinct entities share a single name in the dependency graph.

ExpressionEvaluationError

Exception raised when a parsed expression cannot be evaluated.

ExpressionParseError

Exception raised when a mathematical expression cannot be parsed.

HS3Exception

Base exception class for all pyhs3-related errors.

MissingInitialValueError(message, parameters)

Raised when a free parameter of an analysis has no starting value.

UnconstrainedParameterError(message, parameters)

Raised when a parameter that gets no constraint term must be const but is free.

UnknownParameterOfInterestError(message, ...)

Raised when an analysis names a parameter of interest its likelihood does not use.

UnlistedParameterError(message, parameters, ...)

Raised when an analysis violates HS3 section 2.7.

WorkspaceValidationError

Raised when a workspace fails to validate.