Re: Style of file error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Style of file error messages
Date: 2007-05-30 17:21:25
Message-ID: 5564.1180545685@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Just to get an opinion, which is better:
> could not open whatever file "%s": %m
> or just:
> could not open file "%s": %m

> It seems to me that by the time you get to a file error message of this
> level, the higher-level purpose of the file is pretty irrelevant.

I like the more verbose variant myself, and would argue that indeed our
message style guidelines mandate it:

45.3.9. Type of the object

When citing the name of an object, state what kind of object it is.

Rationale: Otherwise no one will know what "foo.bar.baz" refers to.

A seasoned developer might only need the file name to guess what kind of
file it is, but other people could probably use the help.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-05-30 17:35:43 Re: Ye olde drop-the-database-you-just-left problem
Previous Message Magnus Hagander 2007-05-30 17:18:02 Re: Ye olde drop-the-database-you-just-left problem