Extended error messages (#13647)

This commit is contained in:
Ilya Churaev
2022-10-28 15:14:23 +04:00
committed by GitHub
parent 464e0aae72
commit fa50e35bb8
4 changed files with 10 additions and 8 deletions

View File

@@ -1022,7 +1022,7 @@ const ov::AnyMap& ov::Model::get_map_from_attr(const ov::Any& info) const {
std::shared_ptr<ov::Meta> meta = info.as<std::shared_ptr<ov::Meta>>();
return *info.as<std::shared_ptr<ov::Meta>>();
}
throw ov::Exception("Cannot get rt attribute. Keys are incorrect.");
throw ov::Exception("Cannot get runtime attribute. Path to runtime attribute is incorrect.");
}
ov::AnyMap& ov::Model::get_map_from_attr(ov::Any& info) const {
@@ -1038,7 +1038,7 @@ ov::AnyMap& ov::Model::get_map_from_attr(ov::Any& info) const {
std::shared_ptr<ov::Meta> meta = info.as<std::shared_ptr<ov::Meta>>();
return *info.as<std::shared_ptr<ov::Meta>>();
}
throw ov::Exception("Cannot get rt attribute. Keys are incorrect.");
throw ov::Exception("Cannot get runtime attribute. Path to runtime attribute is incorrect.");
}
const ov::Any& ov::Model::get_attr(const ov::Any& info) const {

View File

@@ -53,7 +53,8 @@ bool evaluate(const HostTensorPtr& arg0,
arg1->get_shape(),
arg2->get_shape());
} else {
throw ngraph_error("Unexpected type");
throw ov::Exception(std::string("Unexpected type ") + arg1->get_element_type().c_type_string() +
" for ScatterNDUpdate evaluate method.");
}
return true;

View File

@@ -108,7 +108,8 @@ bool evaluate(const ngraph::HostTensorPtr& arg0,
axis,
batch_dims);
} else {
throw ov::Exception("Unexpected type");
throw ov::Exception(std::string("Unexpected type ") + arg1->get_element_type().c_type_string() +
" for Gather evaluate method.");
}
return true;