Init* Case = d->getArg(0);
if (typeid(*Case) != typeid(DagInit) ||
GetOperatorName(static_cast<DagInit*>(Case)) != "case")
- throw
- std::string("The argument to (actions) should be a 'case' construct!");
+ throw "The argument to (actions) should be a 'case' construct!";
toolDesc_.Actions = Case;
}
priority = static_cast<int>((*B)->getValueAsInt("priority"));
if (++B != E)
- throw std::string("More than one 'PluginPriority' instance found: "
- "most probably an error!");
+ throw "More than one 'PluginPriority' instance found: "
+ "most probably an error!";
}
return priority;
}
if (NodeB == "root")
- throw std::string("Edges back to the root are not allowed!");
+ throw "Edges back to the root are not allowed!";
}
}
// Error checks.
if (GetOperatorName(d) != "case")
- throw std::string("WalkCase should be invoked only on 'case' expressions!");
+ throw "WalkCase should be invoked only on 'case' expressions!";
if (d.getNumArgs() < 2)
throw "There should be at least one clause in the 'case' expression:\n"
const DagInit& Test = InitPtrToDag(arg);
if (GetOperatorName(Test) == "default" && (i+1 != numArgs))
- throw std::string("The 'default' clause should be the last in the"
- "'case' construct!");
+ throw "The 'default' clause should be the last in the "
+ "'case' construct!";
if (i == numArgs)
throw "Case construct handler: no corresponding action "
"found for the test " + Test.getAsString() + '!';
const std::string& CmdName = *Pos;
if (CmdName == ")")
- throw std::string("$CALL invocation: empty argument list!");
+ throw "$CALL invocation: empty argument list!";
O << "hooks::";
O << CmdName << "(";
break;
case OptionType::Alias:
default:
- throw std::string("Aliases are not allowed in tool option descriptions!");
+ throw "Aliases are not allowed in tool option descriptions!";
}
}
ListInit* LangsToSuffixesList = LangMapRecord->getValueAsListInit("map");
if (!LangsToSuffixesList)
- throw std::string("Error in the language map definition!");
+ throw "Error in the language map definition!";
for (unsigned i = 0; i < LangsToSuffixesList->size(); ++i) {
const Record* LangToSuffixes = LangsToSuffixesList->getElementAsRecord(i);