Fix #15146 - Error reports can not be sent because too large

Fixes #15146
See: 926a9f47bd

Aligned with php code (that does quite the same truncate on the context stack)

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-05-01 16:25:10 +02:00
parent 6b443266c7
commit 3989a1ffe2
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -213,8 +213,8 @@ var ErrorReport = {
var stack = exception.stack[i];
if (stack.context && stack.context.length) {
for (var j = 0; j < stack.context.length; j++) {
if (stack.context[j].length > 180) {
stack.context[j] = stack.context[j].substring(-1, 180);
if (stack.context[j].length > 80) {
stack.context[j] = stack.context[j].substring(-1, 75) + '//...';
}
}
}