From 9c843c3e99a8cb1951399171ceddb01c43924fa2 Mon Sep 17 00:00:00 2001 From: Cathal Corbett Date: Mon, 9 Jan 2023 17:51:37 +0000 Subject: Catch exception by reference instead of by value. Signed-off-by: Cathal Corbett Change-Id: Id765f6d766e623a157b614ca935113a9f32a5801 --- src/armnnTfLiteParser/TfLiteParser.cpp | 6 +++--- 1 file 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 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 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 {}", -- cgit v1.2.1