From a8e06ed540a934f966679e1ef1cf7acf295211b3 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Fri, 19 Oct 2018 16:46:15 +0100 Subject: IVGCVSW-1955: Unify backend exceptions (wrap cl::Error) * Added wrapper function around arm_compute::IFunction::run() that catches cl::Error and wraps it into an armnn::RuntimeException * Added MakeWorkload template inside ClWorkloadFactory that catches cl::Error and wraps it into an armnn::RuntimeException * Replaced cl::Error with armnn::RuntimeException in catch statements inside LoadedNetwork Change-Id: I2340f41ae02b8db1d7ef5157824a50e7410854e3 --- include/armnn/Exceptions.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/armnn/Exceptions.hpp') diff --git a/include/armnn/Exceptions.hpp b/include/armnn/Exceptions.hpp index 29d874cd05..008617d457 100644 --- a/include/armnn/Exceptions.hpp +++ b/include/armnn/Exceptions.hpp @@ -110,6 +110,11 @@ class BadOptionalAccessException : public Exception using Exception::Exception; }; +class RuntimeException : public Exception +{ + using Exception::Exception; +}; + template void ConditionalThrow(bool condition, const std::string& message) { -- cgit v1.2.1