!4722 modiy error type
Merge pull request !4722 from lijiaqi/modify_error_type
This commit is contained in:
commit
70a218123b
|
@ -261,7 +261,7 @@ AnfNodePtr ResolveSymbol(const FuncGraphManagerPtr &manager, const NameSpacePtr
|
|||
}
|
||||
SymbolResolver symbol_resolver(name_space, symbol, node);
|
||||
if (!symbol_resolver.Resolve()) {
|
||||
MS_LOG(EXCEPTION) << "Parse Resolve node failed NodeInfo: " << trace::GetDebugInfo(node->debug_info());
|
||||
MS_EXCEPTION(TypeError) << "Parse Resolve node failed NodeInfo: " << trace::GetDebugInfo(node->debug_info());
|
||||
}
|
||||
|
||||
py::object obj = symbol_resolver.result();
|
||||
|
|
|
@ -162,7 +162,7 @@ def test_sequential_resolve_error():
|
|||
input_np = np.random.randn(2, 3, 4, 5).astype(np.float32)
|
||||
input_me = Tensor(input_np)
|
||||
net = SequenceNet()
|
||||
with pytest.raises(RuntimeError):
|
||||
with pytest.raises(TypeError):
|
||||
net(input_me)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue