示例#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));
        }