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)12Exception::Exception(const std::string& message) 13 : m_Message{message} 14 { 15 } 16 Exception(const std::string & message,const CheckLocation & location)17Exception::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)24Exception::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() const32const char* Exception::what() const noexcept 33 { 34 return m_Message.c_str(); 35 } 36 UnimplementedException()37UnimplementedException::UnimplementedException() 38 : Exception("Function not yet implemented") 39 { 40 } 41 42 } 43