|
Stratax 0.3.1
|
Header: include/stratax/exceptions/Exceptions.hpp
Stratax uses a small exception hierarchy for runtime errors. Each exception contains only the message supplied when it is thrown. There are no error codes, metadata objects, source-location fields, or named exception factories.
Checks are performed directly where their invariants matter:
Every derived class inherits the constructors of StrataxError, so it can be constructed directly from a message. Specialized errors can also be caught as Exceptions::StrataxError or std::runtime_error.
| Exception | Use |
|---|---|
ShapeError | Invalid shape or incompatible element count |
DimensionError | Invalid dimension or dimension arithmetic overflow |
RankError | Incorrect number of dimensions, indices, or slices |
IndexError | Invalid index, slice, or index rank |
TypeError | Unsupported runtime type |
BroadcastError | Incompatible broadcast shapes |
ZeroDivisionError | Division by zero or undefined empty statistic |
AxisError | Invalid reduction axis |
OverflowError | Runtime conversion or allocation-size overflow |
ValueError | Invalid value that does not fit another category |
All exception classes are declared by Exceptions.hpp; there are no separate family headers.