except.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <sstream>
8 #include <stdexcept>
9 
10 #include <ngraph/ngraph_visibility.hpp>
11 
12 namespace ngraph
13 {
14  /// Base error for ngraph runtime errors.
15  class NGRAPH_API ngraph_error : public std::runtime_error
16  {
17  public:
18  explicit ngraph_error(const std::string& what_arg)
19  : std::runtime_error(what_arg)
20  {
21  }
22 
23  explicit ngraph_error(const char* what_arg)
24  : std::runtime_error(what_arg)
25  {
26  }
27 
28  explicit ngraph_error(const std::stringstream& what_arg)
29  : std::runtime_error(what_arg.str())
30  {
31  }
32  };
33 
34  class NGRAPH_API unsupported_op : public std::runtime_error
35  {
36  public:
37  unsupported_op(const std::string& what_arg)
38  : std::runtime_error(what_arg)
39  {
40  }
41  };
42 } // namespace ngraph
Base error for ngraph runtime errors.
Definition: except.hpp:16
Definition: except.hpp:35
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16