TVM  0.9.4
exceptions.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <exception>
6 #include <string>
7 
8 namespace tvm
9 {
10 
11 namespace exception
12 {
13 
15 class Exception : public std::exception
16 {
17 public:
18  Exception() : std::exception() {}
19  Exception(const std::string & what) : what_(what) {}
20  Exception(const char * what) : what_(what) {}
21  const char * what() const noexcept override { return what_.c_str(); }
22 
23 private:
24  std::string what_;
25 };
26 
28 class DataException : public Exception
29 {
30 public:
32 };
33 
36 {
37 public:
38  using DataException::DataException;
39 };
40 
43 {
44 public:
46 };
47 
50 {
51 public:
52  using FunctionException::FunctionException;
53 };
54 
57 {
58 public:
59  using FunctionException::FunctionException;
60 };
61 
64 {
65 public:
66  using FunctionException::FunctionException;
67 };
68 
71 class NotImplemented : public Exception
72 {
73 public:
75 };
76 
77 } // namespace exception
78 
79 } // namespace tvm
Definition: exceptions.h:29
Definition: exceptions.h:57
Definition: exceptions.h:16
Exception(const char *what)
Definition: exceptions.h:20
const char * what() const noexcept override
Definition: exceptions.h:21
Exception(const std::string &what)
Definition: exceptions.h:19
Exception()
Definition: exceptions.h:18
Definition: exceptions.h:43
Definition: exceptions.h:64
Definition: exceptions.h:72
Definition: exceptions.h:50
Definition: exceptions.h:36
Definition: probe.h:44
Definition: Clock.h:12