Added better exception handling to op_imp_check. (#12961)

This commit is contained in:
Mykhailo Hnap 2022-09-08 10:44:38 +03:00 committed by GitHub
parent 90093d5315
commit e0f6cdaa85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,9 @@ void OpImplCheckTest::run() {
try { try {
auto executableNetwork = core->compile_model(function, targetDevice, configuration); auto executableNetwork = core->compile_model(function, targetDevice, configuration);
summary.updateOPsImplStatus(function, true); summary.updateOPsImplStatus(function, true);
} catch (const std::exception& e) {
summary.updateOPsImplStatus(function, false);
GTEST_FAIL() << "Exception in the Core::compile_model() method call: " << e.what();
} catch (...) { } catch (...) {
summary.updateOPsImplStatus(function, false); summary.updateOPsImplStatus(function, false);
GTEST_FAIL() << "Error in the Core::compile_model() method call!"; GTEST_FAIL() << "Error in the Core::compile_model() method call!";