]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 256592: Cut down the DBD error string to a reasonable size; patch by...
authorjocuri%softhome.net <>
Tue, 7 Dec 2004 01:16:33 +0000 (01:16 +0000)
committerjocuri%softhome.net <>
Tue, 7 Dec 2004 01:16:33 +0000 (01:16 +0000)
Bugzilla/DB.pm

index ca2ee29fa6e6ba1dea1b95b1d67af0b68ee9f63a..dcd4199159e92b1aaf9a3d761124dd208dad9102 100644 (file)
@@ -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
 }