From 5babb394c07c243c0e0c3436829bbb68320b459e Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Fri, 10 Jan 2003 00:21:08 +0000 Subject: [PATCH] Propogate errors from the results frame for a nicer stack trace. --- webtools/PLIF/PLIF/Database/ResultsFrame/DBI.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webtools/PLIF/PLIF/Database/ResultsFrame/DBI.pm b/webtools/PLIF/PLIF/Database/ResultsFrame/DBI.pm index bfacb61de5d..fd369045d6e 100644 --- a/webtools/PLIF/PLIF/Database/ResultsFrame/DBI.pm +++ b/webtools/PLIF/PLIF/Database/ResultsFrame/DBI.pm @@ -125,7 +125,14 @@ sub execute { $value = undef; # used to be '' # XXX ? } } - if ($self->handle->execute(@values)) { + my $result = try { + $self->handle->execute(@values); + } except { + raise PLIF::Exception::Database ( + 'message' => $_[0], + ); + }; + if ($result) { $self->executed(1); return $self; } elsif (not $raise) {