ecorm/cppwamp

Conversion lookup failures not propagated to RPC caller

ecorm opened this issue · 0 comments

ecorm commented

When a lookup fails during FromConverter::operator(const String& key, T& value), a std::out_of_range exception is thrown. If this happens during RPC argument demarshalling, it'll result in a program crash.

FromConverter::operator(const String& key, T& value) should catch the std::out_of_range exception, then rethrow a wamp::error::Conversion exception. The RPC invocation mechanism would then catch the wamp::error::Conversion exception and return an ERROR message to the caller.