!822 Change the error type in Infer from ValueError to TypeError

Merge pull request !822 from Simson/push-to-opensource
pull/822/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 286c1d7767

@ -93,7 +93,7 @@ AbstractBasePtr BaseFuncGraphEvaluator::Infer(AnalysisEnginePtr engine, const Ab
MS_EXCEPTION_IF_NULL(fg);
std::size_t nargs = fg->parameters().size();
if (args_spec_list.size() != nargs) {
MS_EXCEPTION(ValueError) << "Function " << fg->ToString() << ", The number of parameters of this function is "
MS_EXCEPTION(TypeError) << "Function " << fg->ToString() << ", The number of parameters of this function is "
<< fg->parameters().size() << ", but the number of provided arguments is "
<< args_spec_list.size() << ". NodeInfo: " << trace::GetDebugInfo(fg->debug_info());
}

Loading…
Cancel
Save