From 855a47b1b0a78c839a674cc1e61d0668b8c4e349 Mon Sep 17 00:00:00 2001 From: Pavel Macenauer Date: Tue, 26 May 2020 10:54:22 +0000 Subject: Catch exceptions by const reference Change-Id: I4b4d8ae419dfb8470e8937e75cd3bab85f03b935 Signed-off-by: Pavel Macenauer --- python/pyarmnn/src/pyarmnn/swig/standard_header.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') 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(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(e.what())); } catch (const std::out_of_range &e) { SWIG_exception(SWIG_IndexError, const_cast(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(e.what())); } catch (const std::out_of_range &e) { SWIG_exception(SWIG_IndexError, const_cast(e.what())); -- cgit v1.2.1