Provide some hints for dispatches with lhs (first param) that is const

This commit is contained in:
Jason Turner
2009-11-21 06:02:17 +00:00
parent 95c124ca35
commit 1c6b2725b3
2 changed files with 7 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ namespace chaiscript
retval = ss.call_function(node->children[i+1]->text, plb);
}
catch(const dispatch_error &){
throw Eval_Error("Mismatched types in equation", node->children[i+1]);
throw Eval_Error(std::string("Mismatched types in equation") + (lhs.is_const()?", lhs is const.":"."), node->children[i+1]);
}
}
catch(const dispatch_error &){