[PATCH] Make brackup-restore report errors if nothing restored
Brad Fitzpatrick
brad at danga.com
Thu Nov 6 04:31:25 UTC 2008
On Tue, Nov 4, 2008 at 1:27 AM, Gavin Carr <gavin at openfusion.com.au> wrote:
> On Mon, Nov 03, 2008 at 10:08:04PM -0800, Brad Fitzpatrick wrote:
> > Just code style. Rest of project uses style:
> > } else {
> >
> > Braces on same line.
> >
> > Also, no need for explicit string concat here:
> >
> > die "nothing found matching '" . $self->{prefix} . "'.\n";
> >
> > Just interoplate it. The ifs are very C-ish too. You could just do:
> >
> > die "Nothing found matching $self->{prefix}.\n" if $self->{prefix};
> > die "Nothing found to restore. (empty .meta file?)\n";
>
> Cool, all adjusted.
>
> > (also note capitalized sentences in error messages.)
>
> Yep, although the dies here are caught and rethrown by brackup-restore,
> and I thought the lowercase version looked slightly better:
>
> Error doing restore: nothing found matching 'foobar'.
>
> vs.
>
> Error doing restore: Nothing found matching 'foobar'.
>
> I don't really care though - which do you prefer?
Oh, the former's nice. Either way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/brackup/attachments/20081105/6cb90170/attachment.html
More information about the brackup
mailing list