McDermott-Group / servers

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

[Datachest] Opening a dataset throws Warning instead of Exception #92

Closed roboguy222 closed 7 years ago

roboguy222 commented 7 years ago

This seems like it definitely should be an Exception, so we can catch it if we try to open a non-existing dataset.

amopremcak commented 7 years ago

I changed this to a ValueError as its description:

Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.

seems more appropriate than a warning. Unfortunately the FileNotFoundError is not recognized by python 2.7 (existed in earlier versions) so it cannot be used.