[prev] [thread] [next] [lurker] [Date index for 2003/11/24]
I saw the following code in YAPC::Organizer.pm:
sub do_registration {
my $self = shift;
my $q = $self->query;
#warn $q->param('run');
my $person;
eval {
$person = YAPC::Person->new($q->Vars);
};
if ($@) {
>>>> my $msg = $@;
# cannot register (duplicate email ?, other problem ?)
my $t = $self->_server_page('registration',
"$templates_dir/registration.tmpl");
>>>> # $t->param(MESSAGE => 'There was an error in the provided data.');
$t->param(MESSAGE => $msg);
return $t->output;
} else {
Notice that I corrected it. Now we assign $msg the exception string, but don't
do anything with it. Then we pass a generic MESSAGE string (that does not
tell the user what the problem is) to the template. Notice my correction. A
better one may be including the generic message followed by the particular
error.
I'm not sending a patch yet, because I noticed it would break our test
scripts. (which can arguably be broken as well). What should we do?
Regards,
Shlomi Fish
--
---------------------------------------------------------------------
Shlomi Fish shlomif@xxxx.xxx.xx
Homepage: http://t2.technion.ac.il/~shlomif/
I don't believe in fairies. Oops! A fairy died.
I don't believe in fairies. Oops! Another fairy died.
Generated at 21:06 on 24 Nov 2003 by mariachi 0.51