From 149b85901ce84dc628c5da675268aa1017d6ca8e Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Tue, 7 Dec 2004 01:16:33 +0000 Subject: Patch for bug 256592: Cut down the DBD error string to a reasonable size; patch by Byron Jones (glob) , r=vladd, a=justdave. --- Bugzilla/DB.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index ca2ee29fa..dcd419915 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -166,6 +166,9 @@ sub _connect { sub _handle_error { require Carp; + # Cut down the error string to a reasonable size + $_[0] = substr($_[0], 0, 2000) . ' ... ' . substr($_[0], -2000) + if length($_[0]) > 4000; $_[0] = Carp::longmess($_[0]); return 0; # Now let DBI handle raising the error } -- cgit v1.2.3-24-g4f1b