A better error message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71068 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2009-05-06 04:54:23 +00:00
parent 87e3bcab73
commit e031e4bcb9

View File

@ -86,8 +86,8 @@ const DagInit& InitPtrToDag(const Init* ptr) {
// less than or equal to min_arguments, otherwise throw an exception. // less than or equal to min_arguments, otherwise throw an exception.
void checkNumberOfArguments (const DagInit* d, unsigned min_arguments) { void checkNumberOfArguments (const DagInit* d, unsigned min_arguments) {
if (!d || d->getNumArgs() < min_arguments) if (!d || d->getNumArgs() < min_arguments)
throw "Property " + d->getOperator()->getAsString() throw d->getOperator()->getAsString()
+ " has too few arguments!"; + ": too few arguments!";
} }
// isDagEmpty - is this DAG marked with an empty marker? // isDagEmpty - is this DAG marked with an empty marker?