Commit e19cc4a7 authored by Michał Karzyński's avatar Michał Karzyński Committed by Robert Kimball

[ONNX] Refactor exceptions (#1467)

parent 31ee5658
......@@ -24,9 +24,9 @@ namespace ngraph
{
namespace error
{
struct not_supported_error : ngraph_error
struct NotSupported : ngraph_error
{
explicit not_supported_error(const std::string& op_name,
explicit NotSupported(const std::string& op_name,
const std::string& name,
const std::string& message)
: ngraph_error{op_name + " node (" + name + "): " + message}
......@@ -34,19 +34,18 @@ namespace ngraph
}
};
namespace op
namespace parameter
{
struct op_value_error : ngraph_error
struct Value : ngraph_error
{
explicit op_value_error(const std::string& op_name,
Value(const std::string& op_name,
const std::string& name,
const std::string& message)
: ngraph_error{op_name + " node (" + name + "): " + message}
{
}
};
} // namespace op
} // namespace paramter
} // namespace error
......
......@@ -48,13 +48,13 @@ namespace ngraph
if (!is_test)
{
throw error::not_supported_error("BatchNormalization",
throw error::NotSupported("BatchNormalization",
node.get_name(),
"only 'is_test' mode is currently supported.");
}
if (!spatial)
{
throw error::not_supported_error("BatchNormalization",
throw error::NotSupported("BatchNormalization",
node.get_name(),
"only 'spatial' mode is currently supported.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment