aboutsummaryrefslogtreecommitdiff
path: root/profiling/common/include/ProfilingException.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/common/include/ProfilingException.hpp')
-rw-r--r--profiling/common/include/ProfilingException.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/profiling/common/include/ProfilingException.hpp b/profiling/common/include/ProfilingException.hpp
new file mode 100644
index 0000000000..532c2d49f7
--- /dev/null
+++ b/profiling/common/include/ProfilingException.hpp
@@ -0,0 +1,29 @@
+//
+// Copyright © 2020 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include <stdexcept>
+#include <string>
+
+namespace armnnProfiling
+{
+
+/// General Exception class for Profiling code
+class ProfilingException : public std::exception
+{
+public:
+ explicit ProfilingException(const std::string& message) : m_Message(message) {};
+
+ /// @return - Error message of ProfilingException
+ virtual const char* what() const noexcept override
+ {
+ return m_Message.c_str();
+ }
+
+private:
+ std::string m_Message;
+};
+
+} // namespace armnnProfiling