McDermott-Group / servers

Public repo that stores LabRAD servers and other non-measurement related code
0 stars 2 forks source link

[gpib_server] read/write/query prints error instead of returning (raising) exception #45

Open roboguy222 opened 8 years ago

roboguy222 commented 8 years ago

This means errors cannot be caught upstream, which is not good. I briefly tried to fix this but letting them error out, but it seems like a more thorough investigation must be done. The GPIB Device Manager needs to catch the errors, which seems easy enough, but I was also having trouble getting the ADR Server/Client to work properly. Not sure what is going on, but I am guessing something with timing.

patzinak commented 7 years ago

There are multiple issues with the GPIB server and the GPIB Manager in general. There was some activity related to the entire design and to read_raw/write_raw settings on the UCSB LabRAD and server repos.

Also, it is not clear for me what is the proper way of handling errors in the servers. Should any errors be exposed to the user of a server or all errors should be handled gracefully inside the server and the user should only get a "-1"-like message that indicates the failure?

roboguy222 commented 7 years ago

I'm not sure what the best way to handle them should be. I think usually exceptions are raised, but maybe we don't want to do that for some reason.

patzinak commented 7 years ago

No, by the assignment I didn't mean that you have to rewrite the GPIB server and the manager. I just thought you are the most knowledgeable person on this and related issues, You definitely know more than me. It would be great if you just keep an eye on the developments/find the opportunity to reassign this to someone else in the future/label it "won't fix"/"bug"/"question" and so on and so for. I totally understand that this is a nightmare and this should definitely not be your highest priority.