aboutsummaryrefslogtreecommitdiff
path: root/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp')
-rw-r--r--tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
index 3c75ed7f24..37138f4a78 100644
--- a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
+++ b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
@@ -190,7 +190,17 @@ int main(int argc, char* argv[])
}
catch (armnn::Exception const& e)
{
- BOOST_LOG_TRIVIAL(fatal) <<"Armnn Error: "<< e.what();
+ // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
+ // exception of type std::length_error.
+ // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
+ std::cerr << "Armnn Error: " << e.what() << std::endl;
return 1;
}
-} \ No newline at end of file
+ catch (const std::exception& e)
+ {
+ // Coverity fix: various boost exceptions can be thrown by methods called by this test.
+ std::cerr << "WARNING: MultipleNetworksCifar10: An error has occurred when running the "
+ "multiple networks inference tests: " << e.what() << std::endl;
+ return 1;
+ }
+}