Author: veithm
Date: Fri Apr 4 09:54:22 2014
New Revision: 1584587
URL: http://svn.apache.org/r1584587
Log:
Helper handles error in creation of TransportFactory
In case the EtchTransportFactory cannot return a ServerFactory for the
given URI, e.g. in case the user forgets to add the tcp:// prefix in the
connection URI, now an error is returned.
Change-Id: I636d2e6a507210fa371b73dd380a0e6ed15cef3b
Modified:
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm
Modified:
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm
URL:
http://svn.apache.org/viewvc/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm?rev=1584587&r1=1584586&r2=1584587&view=diff
==============================================================================
---
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm
(original)
+++
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm
Fri Apr 4 09:54:22 2014
@@ -133,7 +133,11 @@ status_t $clname::newListener(EtchRuntim
//get listener
EtchTransport<EtchServerFactory>* listener;
- EtchTransportFactory::getListener(runtime, uri, res, listener);
+ status = EtchTransportFactory::getListener(runtime, uri, res, listener);
+ if (status != ETCH_OK) {
+ ETCH_LOG_ERROR(runtime->getLogger(),
runtime->getLogger().getRuntimeContext(), "Listener could not be created by the
transport factory for the given URI.");
+ return status;
+ }
//create server
serverFactory = new $clname::Listener${i}Server(listener, implFactory);