aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2023-01-09 17:51:37 +0000
committerCathal Corbett <cathal.corbett@arm.com>2023-01-10 15:15:43 +0000
commit9c843c3e99a8cb1951399171ceddb01c43924fa2 (patch)
treeffc18acf2d2e232ebc12ce69983fb565346b56a3
parent71723d40d63ffdd4b7b7b1a1cc8678bc93acb4d7 (diff)
downloadarmnn-9c843c3e99a8cb1951399171ceddb01c43924fa2.tar.gz
Catch exception by reference instead of by value.
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Id765f6d766e623a157b614ca935113a9f32a5801
-rw-r--r--src/armnnTfLiteParser/TfLiteParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/armnnTfLiteParser/TfLiteParser.cpp b/src/armnnTfLiteParser/TfLiteParser.cpp
index 191cfd2b48..f6c1ee9d38 100644
--- a/src/armnnTfLiteParser/TfLiteParser.cpp
+++ b/src/armnnTfLiteParser/TfLiteParser.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -4907,7 +4907,7 @@ TfLiteParserImpl::CreateConstTensorNonPermuted(TensorRawPtr tensorPtr,
std::unique_ptr<float[]> data = armnnUtils::ToFloatArray(bufferPtr->data, tensorInfo);
return std::make_pair(ConstTensor(constTensorInfo, data.get()), std::move(data));
}
- catch (armnn::InvalidArgumentException)
+ catch (InvalidArgumentException&)
{
throw ParseException(
fmt::format("Unsupported input/weights combination: Input {} not supported with Weights {}",
@@ -4941,7 +4941,7 @@ TfLiteParserImpl::CreateConstTensorPtr(TensorRawPtr tensorPtr, armnn::TensorInfo
std::unique_ptr<float[]> data = armnnUtils::ToFloatArray(bufferPtr->data, tensorInfo);
return std::make_pair(new ConstTensor(constTensorInfo, data.get()), std::move(data));
}
- catch (armnn::InvalidArgumentException)
+ catch (InvalidArgumentException&)
{
throw ParseException(
fmt::format("Unsupported input/weights combination: Input {} not supported with Weights {}",