ISISComputingGroup / lewis-ess

Let's write intricate simulators!
GNU General Public License v3.0
21 stars 19 forks source link

Improve Docs / Error Msg for Protocol Param Syntax #265

Open MikeHart85 opened 7 years ago

MikeHart85 commented 7 years ago

Due to being YAML, the protocol parameters are very sensitive to whitespace (or lack thereof) and other quirks of the standard.

If the entered syntax does not parse correctly, the resulting error message isn't very useful:

$ lewis -p "stream:{bind_address:localhost,port:57677}" linkam_t95
2017-10-24 15:55:41,503 INFO lewis.DeviceBase: Creating device, setting up state machine
An error occurred:
'stream:{bind_address:localhost,port:57677}' is not a valid protocol for device 'linkam_t95', select one via the -p option.
Available protocols are:
    stream

The message should at least suggest that syntax might be the issue.

Also, documentation should do a better job of drawing attention to the fact that this is YAML and whitespace is significant.