nicetoolbox.utils.logging_utils.assert_and_log¶
- nicetoolbox.utils.logging_utils.assert_and_log(condition, message)[source]¶
Asserts a condition and logs an error message if the condition is not met.
- Parameters:
condition (bool) – The condition to be checked.
message (str) – The error message to be logged if the condition is not met.
- Returns:
None
- Raises:
AssertionError – If the condition is not met.
SystemExit – If the condition is not met, the function will terminate the program with a status code of 1.