error stack with Tango LabView 2012 binding
|
|
---|---|
Hi, I have a LabView application which communicates with a remote tango device server. In the CPP device server, I use the method is_attr_allowed() to give (or not) access to write attribute. In case of the method is_attr_allowed() returns FALSE, I want to send a specific error message to the client. By default, the client get the following error stack: //======== LabView error stack start API_AttributeFailed Failed to execute DeviceProxy::write_attributes on device phasicssrv/oasystangophasics/oasys, object(s) SID4_CTL_RemoteControl DeviceProxy::write_attributes //======== LabView error stack end So I need to change the message sent by the tango decive server to the Tango LabView client. I used the following code : //===================================START TangoSys_OMemStream o; o << "Attribute" << "Attribute" << " not allowed" << ends; Tango::Except::throw_exception("origin", "description","raison"); try { //… } catch (Tango::DevFailed &e) { TangoSys_OMemStream o; o << "Attribute" << "Attribute" << " not allowed" << ends; Tango::Except::re_throw_exception(e,"origin","description","raison"); } //=================================== END but the Labview client does not get the good error message . It still have the default error stack illustrated above. NB: If I use the JIVE interface to write attribute, I have good error message specified in the source code. Question: Is there a solution for changing the error stack message received by the LabView application? Thanks for your replies |
|
|
---|---|
Hi, please use the code tags.
You are not doing anything with the stream o here. Maybe you wanted to feed that into one of the arguments of re_throw_exception? |
|
|
---|---|
Hi, Thanks for your reply, Indeed, the stream o is not not used in this part of code. I don't necessarily need it but it can also be used into one of the arguments of re_throw_exception.
|
|
|
---|---|
@xk, Hum, sounds like a bug in the client part of the binding. It's supposed to propagate the exception as thrown by the server. I created an issue on the github repo. I'll have a look to the problem ASAP. Thanks for reporting. |