]> 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:05 +0000 (01:16 +0000)
committerjocuri%softhome.net <>
Tue, 7 Dec 2004 01:16:05 +0000 (01:16 +0000)
Bugzilla/DB.pm

index 26a3a007273da24f15d0e1ae61100474f59fa003..1fad0079b7ba7a841d2dc4aa62580bf2386161ec 100644 (file)
@@ -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
 }