Quoting Matt S Trout <[EMAIL PROTECTED]>: > On Mon, Aug 04, 2008 at 10:32:31AM +0200, Tobias Kremer wrote: > > Quoting Ash Berlin <[EMAIL PROTECTED]>: > > > A method on the storage object (which is subclassed to be the > > > particular type of DBI you are connecting to, eg > > > DBIx::Class::Storage::DBI::mysql) which parses and encapsulates the > > > error as returned from the database to mark its type, e.g. FK > > > constraint violation, duplicate key, etc. etc. > > > Then you could check [EMAIL PROTECTED]>type eq 'duplicate_key' or > > > something.
> Doesn't storage go via $self->throw_exception ? If so you could put the > parsing in there. You mean overriding throw_exception in the storage-specific subclasses? Sounds good to me. Would you return a normalized string or rather some sort of exception object? --Tobias _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
