Template Function mass::internal::precondition

Template Function mass::internal::precondition#

Function Documentation#

template<typename ...T>
void mass::internal::precondition(const bool condition, logger::format_string<T...> fmt, T&&... args)#

Evaluate the provided condition, only continue if it is true, otherwise, log an error and throw an exception immediately

Parameters:
  • condition – the condition that will be evaluated

  • fmt – the format of the error message if the condition fails

  • args – the arguments to be formatted into the error message