Exceptions#
Runtime exceptions#
- class caterpillar.exception.StructException(message: str, context: _ContextLike | None = None)[source]#
Base class for all struct-related exceptions
- class caterpillar.exception.InvalidValueError(message: str, context: _ContextLike | None = None)[source]#
An exception raised for invalid configuration values.
- class caterpillar.exception.DynamicSizeError(message: str, context: _ContextLike | None = None)[source]#
Exception raised for errors related to dynamic sizes in structs.
This can be used when there are issues with determining the size of a struct element at runtime.
- class caterpillar.exception.StreamError(message: str, context: _ContextLike | None = None)[source]#
An exception raised for read and write issues.
- class caterpillar.exception.DelegationError(message: str, context: _ContextLike | None = None)[source]#
An exception used if underlying calls fail.
- class caterpillar.exception.Stop(message: str, context: _ContextLike | None = None)[source]#
Stops the current parsing process
Formal exceptions#
- class caterpillar.exception.OptionError(message: str, context: _ContextLike | None = None)[source]#
Exception raised for errors related to options in structs.
This can be used when there are issues with handling options or choices within a struct.
- class caterpillar.exception.UnsupportedOperation(message: str, context: _ContextLike | None = None)[source]#
Exception raised for unsupported operations in structs.
This can be used when attempting an operation that is not supported or allowed in the context of structs.
- class caterpillar.exception.ValidationError(message: str, context: _ContextLike | None = None)[source]#
Exception raised for errors related to validation in structs.
This can be used when there are issues with validating the structure or content of a struct.