[Maypole] catching DB errors

From: Toby Corkindale (maypole at wintrmute.net)
Date: Mon Jan 24 2005 - 18:24:00 GMT


Hi,
During the test/debug/fix process, I frequently am thrown DB errors, such as
when trying to insert a record is a duplicate but has a unique index upon it.
(eg. id serial primary key, username varchar(32) not null unique)

The DB errors currently go to the apache error_log, and the user sees a 404
Page not found error.

It'd be nice to present a page saying "Sorry you hit an error:" and then
displays the error message, at least, for our testing purposes.

What would be the best way to go about this in Maypole?

I suspect it'd involve creating a custom Class::DBI _croak() function in the
model classes, but I'm not sure.. What do you think?

thanks,
Toby

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT