From: Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 Date: Thu, 26 Jul 2018 14:30:30 +0000 (+0300) Subject: nnc: add plugin name to execution exception (#807) X-Git-Tag: nncc_backup~2292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff61f3be67193d5b28719d0a4f0133a32c235cff;p=platform%2Fcore%2Fml%2Fnnfw.git nnc: add plugin name to execution exception (#807) show plugin name on execution failed Signed-off-by: Vitaliy Cherepanov --- diff --git a/contrib/nnc/src/module/AbstractModule.cpp b/contrib/nnc/src/module/AbstractModule.cpp index b80a396..32fb87e 100644 --- a/contrib/nnc/src/module/AbstractModule.cpp +++ b/contrib/nnc/src/module/AbstractModule.cpp @@ -64,7 +64,15 @@ void *AbstractModule::execute(void *data) { if (_activePlugin == nullptr) throw ConfigException("Module <" + pluginTypeToStr(_moduleType) + "> has not been configured!"); - return _activePlugin->getPluginInstance().execute(data); + void *result = nullptr; + + try { + result = _activePlugin->getPluginInstance().execute(data); + } catch (nncc::foundation::Exception &e) { + e.append("Plugin <" + _activePlugin->getPluginName() + "> execution failed!"); + throw; + } + return result; } contrib::plugin::PluginType AbstractModule::getModuleType() const { return _moduleType; }