Patch for bug 256592: Cut down the DBD error string to a reasonable size; patch by Byron Jones (glob) <bugzilla@glob.com.au>, r=vladd, a=justdave.
git-svn-id: svn://10.0.0.236/trunk@166324 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7b75d470ee
commit
7877d122ef
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user