On 11/04/2016 02:49 PM, Dylan Baker wrote:
Quoting Brian Paul (2016-11-04 13:18:21)
On 11/04/2016 01:49 PM, Dylan Baker wrote:
[snip]

This works, but
1. seems like a lot of duplicated code.
2. How about a simpler error message like: "Unable to open '%s'"

But that's not the problem. The function that it's failing in is responsible for
deciding which backend to send the file to to be opened, not opening the file
itself. That message would make me think that the file was corrupt, or invalid
JSON, not that I'd typoed the file extension or pointed at the wrong directory.

What about: "unknown file extension '%s'"?

Ah, OK. When I try "nonexistant.json.bz2" I get "No such file or directory".

I guess I'd like to see that message if the input file doesn't exist, regardless of extension. But if the file does exist and its type isn't recognized, report something like "unknown file type/extension".

Does that seem reasonable?  That's kind of what gcc does.

-Brian

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to