aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Exceptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/Exceptions.cpp')
-rw-r--r--src/armnn/Exceptions.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/armnn/Exceptions.cpp b/src/armnn/Exceptions.cpp
index 1c4ebb6aba..52b28e9382 100644
--- a/src/armnn/Exceptions.cpp
+++ b/src/armnn/Exceptions.cpp
@@ -2,7 +2,7 @@
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
-#include "armnn/Exceptions.hpp"
+#include <armnn/Exceptions.hpp>
#include <string>
@@ -10,10 +10,25 @@ namespace armnn
{
Exception::Exception(const std::string& message)
-: m_Message(message)
+: m_Message{message}
{
}
+Exception::Exception(const std::string& message,
+ const CheckLocation& location)
+: m_Message{message}
+{
+ m_Message += location.AsString();
+}
+
+Exception::Exception(const Exception& other,
+ const std::string& message,
+ const CheckLocation& location)
+: m_Message{other.m_Message}
+{
+ m_Message += "\n" + message + location.AsString();
+}
+
const char* Exception::what() const noexcept
{
return m_Message.c_str();