On Sun, May 09, 2010 at 10:45:23PM -0700, rehs...@cvs.perl.org wrote:
> - move from "die" to "croak"
> +                croak "Can't find columns\n" unless $self->{column_names};
> +                croak "Can't find columns\n" unless $self->{column_names};
> +                croak "Can't parse values\n" unless $self->{values};
> +    croak "Couldn't parse\n"
> +    croak "Bad ORDER BY clause '$str'\n" if @clause > 2;
> +    croak "Bad ORDER BY clause '$clause[1]'\n";
> +         croak "No column definition for '$_'\n";
> +    croak "Can't parse set clause\n"
> +        croak "Couldn't find WHERE clause in '$str'\n";
> +    croak "Couldn't parse WHERE expression '$str'\n"
> +    croak "Number of params '$num_params' does not match "
>        . "number of placeholders '$num_placeholders'\n"
> +        croak "No such column '$stmt_col_name'\n";
> +        croak "No such column '$stmt_col_name'\n";

A croak message that ends with a newline yields a messy error that has a
newline between the error and the file and line number details.

Best to delete the newlines.

> +    croak $@ if $@;

In this case you'll probably want to chomp $@ first.

Tim.

Reply via email to