aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPavel Macenauer <pavel.macenauer@linaro.org>2020-05-26 10:54:22 +0000
committerDerek Lamberti <derek.lamberti@arm.com>2020-05-27 12:19:00 +0000
commit855a47b1b0a78c839a674cc1e61d0668b8c4e349 (patch)
tree946e6e78ad98fd84fc9e43aabf508debb321b43d /python
parent12239e7291fb04b862e44045be0a4feb7751af62 (diff)
downloadarmnn-855a47b1b0a78c839a674cc1e61d0668b8c4e349.tar.gz
Catch exceptions by const reference
Change-Id: I4b4d8ae419dfb8470e8937e75cd3bab85f03b935 Signed-off-by: Pavel Macenauer <pavel.macenauer@nxp.com>
Diffstat (limited to 'python')
-rw-r--r--python/pyarmnn/src/pyarmnn/swig/standard_header.i6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/pyarmnn/src/pyarmnn/swig/standard_header.i b/python/pyarmnn/src/pyarmnn/swig/standard_header.i
index b26cb0d396..a469815675 100644
--- a/python/pyarmnn/src/pyarmnn/swig/standard_header.i
+++ b/python/pyarmnn/src/pyarmnn/swig/standard_header.i
@@ -23,7 +23,7 @@
%exception{
try {
$action
- } catch (armnn::Exception &e) {
+ } catch (const armnn::Exception& e) {
SWIG_exception(SWIG_RuntimeError, const_cast<char*>(e.what()));
}
};
@@ -31,7 +31,7 @@
%exception __getitem__ {
try {
$action
- } catch (armnn::InvalidArgumentException &e) {
+ } catch (const armnn::InvalidArgumentException &e) {
SWIG_exception(SWIG_ValueError, const_cast<char*>(e.what()));
} catch (const std::out_of_range &e) {
SWIG_exception(SWIG_IndexError, const_cast<char*>(e.what()));
@@ -43,7 +43,7 @@
%exception __setitem__ {
try {
$action
- } catch (armnn::InvalidArgumentException &e) {
+ } catch (const armnn::InvalidArgumentException &e) {
SWIG_exception(SWIG_ValueError, const_cast<char*>(e.what()));
} catch (const std::out_of_range &e) {
SWIG_exception(SWIG_IndexError, const_cast<char*>(e.what()));