rticommunity / rticonnextdds-connector

RTI Connector for Connext DDS is a lightweight technology that enables DDS data to be accessed with Javascript (Node.js), Python, and Lua.
Other
56 stars 33 forks source link

There seems no error handling for setFromJSON() for the Node connector version #51

Closed shiwanlin closed 7 years ago

shiwanlin commented 7 years ago

There seems no error handling for this.setFromJSON = function(jsonObj) { rtin.RTIDDSConnector_setJSONInstance(output.connector.native,output.name, JSON.stringify(jsonObj)); } It does not return error code and does not throw an exception for a certain error but just printing out some console message, something like this:

RTILuaJsonHelper_parse_json_node:!get kind failed for 'deviceId'

(This is for the case the JSON object passed does not contain a required/expected field.)

Of course, one can argue that the app needs to validate the JSON object before passing it in. However, there could be other types of the error within the connector codes an app developer may not anticipate. Production software needs better error handling than just console printing out... :-)

gianpiero commented 7 years ago

Hello,

Thanks for your feedback. We are aware of some functions that do not report errors, for example the write operation is another one beside the setFromJSON. The internal ticket is CON-24 .

The Connector is an internal tool that we develop to put together quick demo and tests in the RTI Research Team. We decided to share it to gather early feedback, but we clearly state in the main README here, that is an 'experimental' product and we don't officially support it (beside on the community forum).

We agree with you: Better error handling is necessary for production software! Unfortunately connector is not there yet. We are working on improving it and we really appreciate you trying this out and providing your feedback.

You can contact your local sales rep (sales@rti.com) to learn more about roadmap and timeline.

Thank you, Gianpiero