blob: 52b28e9382aa49ddb6b231856a6ffa596e745e2b [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
David Beck3cc9a622018-10-12 10:38:31 +01005#include <armnn/Exceptions.hpp>
telsoa014fcda012018-03-09 14:13:49 +00006
7#include <string>
8
9namespace armnn
10{
11
12Exception::Exception(const std::string& message)
David Beck3cc9a622018-10-12 10:38:31 +010013: m_Message{message}
telsoa014fcda012018-03-09 14:13:49 +000014{
15}
16
David Beck3cc9a622018-10-12 10:38:31 +010017Exception::Exception(const std::string& message,
18 const CheckLocation& location)
19: m_Message{message}
20{
21 m_Message += location.AsString();
22}
23
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
telsoa014fcda012018-03-09 14:13:49 +000032const char* Exception::what() const noexcept
33{
34 return m_Message.c_str();
35}
36
37UnimplementedException::UnimplementedException()
38: Exception("Function not yet implemented")
39{
40}
41
42}