[PATCH] Make brackup-restore report errors if nothing restored

Gavin Carr gavin at openfusion.com.au
Tue Nov 4 09:27:36 UTC 2008


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?

Cheers,
Gavin



More information about the brackup mailing list