project8 / dripline

Slow controls for medium scale physics experiments based on AMQP centralized messaging
http://www.project8.org/dripline
1 stars 0 forks source link

FormatSCPISpime cal help message not very helpful #128

Closed laroque closed 9 years ago

laroque commented 9 years ago

If the raw value is not in the calibration dict, it says so, but doesn't give the raw value provided, which is not very helpful. Sending back the raw value received (and actually, having a payload with the raw value, in addition to the error return code) would be much nicer.

laroque commented 9 years ago

working on doing this by updating the __init__ method of Exception to allow an optional kwarg for ret_val. If present, it can be extracted in a try/catch block and applied to the ReplyMessage returned, along with the error's return code and message.

laroque commented 9 years ago

DriplineException.result now exists... need to modify endpoint.handle_request() such that it puts any error message into the ret_message field of the payload (or status.message or payload.ret_msg or whatever we decide is the right place for such messages) and uses .result as the actual payload for the reply.

laroque commented 9 years ago

we went with return_msg, it is also not in the payload but was promoted to a field of the message proper (parallel to retcode).

Endpoint's cal now will return a payload with raw value in the event of an error, also the return code.