Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 7930
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: Nobody in particular
Requestors: BeerDB::Beer-
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.7
Fixed in: (no value)



Subject: constraint failures aren't caught properly
broken in the trunk 2004/10/07 snapshot too. to reproduce add this to BeerDB.pm after BeerDB->setup: BeerDB::Beer->require; BeerDB::Beer->add_constraint('always_fail_constraint', name => sub { return 0 }); then try to add a new beer 'uuuuuu' at localhost/beerdb/beer/list you'll get a "Not Found" page error log shows this: caught model error: validate_column_values error: name BeerDB::Beer name fails 'always_fail_constraint' constraint with 'uuuuu' at /usr/lib/perl5/site_perl/5.8.3/Class/Trigger.pm line 51 at /usr/lib/perl5/site_perl/5.8.3/Class/DBI/FromCGI.pm line 246 [Thu Oct 07 15:04:42 2004] [error] [client 10.20.2.9] File does not exist: /home/httpd/beerdb/beer, referer: http://qa/beerdb/beer/list
From: kconnor [...] proofpoint.com
to clarify, I'm thinking they should be caught the same as validate errors are - the template gets reset to edit (should be addnew) and the user's values are maintained and error messages are given as defined in the template. as it is, FromCGI::run_create doesn't catch the error thrown in DBI::create
From: kconnor [...] proofpoint.com
Sebastian, the maintainer of Maypole, says this bug should be an enhancement of Class::DBI::FromCGI rather than Maypole