* [neurun] [nnapi] Meaningful exception message
Throw exception with meaningful description in case of unsupported operation
Signed-off-by: Vladimir Plazun <v.plazun@samsung.com>
* Format fix
Signed-off-by: Vladimir Plazun <v.plazun@samsung.com>
const OperationFactory::Param ¶m,
neurun::model::Operands &operands)
{
- return _map.at(type)(param, operands);
+ auto it = _map.find(type);
+ if (it == _map.end())
+ {
+ throw std::runtime_error("Unsupported operation type: " + std::to_string(type));
+ }
+ return it->second(param, operands);
}