• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include <armnn/Exceptions.hpp>
6 
7 #include <string>
8 
9 namespace armnn
10 {
11 
Exception(const std::string & message)12 Exception::Exception(const std::string& message)
13 : m_Message{message}
14 {
15 }
16 
Exception(const std::string & message,const CheckLocation & location)17 Exception::Exception(const std::string& message,
18                      const CheckLocation& location)
19 : m_Message{message}
20 {
21     m_Message += location.AsString();
22 }
23 
Exception(const Exception & other,const std::string & message,const CheckLocation & location)24 Exception::Exception(const Exception& other,
25                      const std::string& message,
26                      const CheckLocation& location)
27 : m_Message{other.m_Message}
28 {
29     m_Message += "\n" + message + location.AsString();
30 }
31 
what() const32 const char* Exception::what() const noexcept
33 {
34     return m_Message.c_str();
35 }
36 
UnimplementedException()37 UnimplementedException::UnimplementedException()
38 : Exception("Function not yet implemented")
39 {
40 }
41 
42 }
43