[Piglit] [PATCH 2/2] framework: Provide more helpful error message when loading results fails
Dylan Baker
dylan at pnwbakers.com
Fri Nov 4 23:21:44 UTC 2016
Quoting Brian Paul (2016-11-04 16:02:38)
> 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
>
Yup that sounds reasonable, I'll send a v2.
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161104/2e8ca316/attachment.sig>
More information about the Piglit
mailing list