mate_common.assertions module¶
Common assertion code for MATE.
- exception mate_common.assertions.RuntimeAssertionError(message: str)¶
Bases:
mate_common.assertions._MateAssertionError
An exception class for runtime assertions in MATE.
A “runtime” assertion is one during MATE’s normal lifecycle, i.e. not tied to a particular compilation or build process.
- Parameters
message (str) –
- Return type
None
- message: str¶
- mate_common.assertions.mate_assert(condition: bool, msg: str = '') None ¶
Assert a condition that always indicates a programming error in MATE.
These assertions will cause a MATE process (CLI, server) to raise if assertions are enabled, which in turn will cause either an error response (server) or a process termination (CLI).
- Parameters
condition (bool) –
msg (str) –
- Return type
None