4.4. Exceptions#
4.4.1. Runtime exceptions#
- class caterpillar.exception.StructException(message: str, context=None)[source]#
Base class for all struct-related exceptions
- class caterpillar.exception.InvalidValueError(message: str, context=None)[source]#
An exception raised for invalid configuration values.
- class caterpillar.exception.DynamicSizeError(message: str, context=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=None)[source]#
An exception raised for read and write issues.
4.4.2. Formal exceptions#
- class caterpillar.exception.OptionError(message: str, context=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.