From: jocuri%softhome.net <> Date: Tue, 7 Dec 2004 01:16:05 +0000 (+0000) Subject: Patch for bug 256592: Cut down the DBD error string to a reasonable size; patch by... X-Git-Tag: bugzilla-2.18~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04ec3be161074ab3f6b8d42b792c1417ee8ee0d0;p=thirdparty%2Fbugzilla.git Patch for bug 256592: Cut down the DBD error string to a reasonable size; patch by Byron Jones (glob) , r=vladd, a=justdave. --- diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 26a3a00727..1fad0079b7 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -164,6 +164,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 }