Пример #1
0
void throw_if(const PredicateT& pred, const char* message)
{
  if (pred())
  {
    throw ExceptionT(message);
  }
}
Пример #2
0
const ArgT& throw_if(const ArgT& arg, const PredicateT& pred, const char* message)
{
  if (pred(arg))
  {
    throw ExceptionT(message);
  }

  return arg;
}
Пример #3
0
        static void raise(ExceptionT &&exc)
        {
//            std::cout << "THROWING AN EXCEPTION: " << exc << std::endl;
            throw ExceptionT(std::move(exc));
        }