mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Changeset: Improve logged error message
I saw this on a production system today and wanted more information.
This commit is contained in:
parent
7fa9b07116
commit
37bb297e76
1 changed files with 5 additions and 1 deletions
|
@ -907,7 +907,11 @@ const textLinesMutator = (lines) => {
|
||||||
// there may be more chars in the line (newline is not reached)
|
// there may be more chars in the line (newline is not reached)
|
||||||
const sline = putCurLineInSplice();
|
const sline = putCurLineInSplice();
|
||||||
if (!curSplice[sline]) {
|
if (!curSplice[sline]) {
|
||||||
console.error('curSplice[sline] not populated, actual curSplice contents is ', curSplice, '. Possibly related to https://github.com/ether/etherpad-lite/issues/2802');
|
const err = new Error(
|
||||||
|
'curSplice[sline] not populated, actual curSplice contents is ' +
|
||||||
|
`${JSON.stringify(curSplice)}. Possibly related to ` +
|
||||||
|
'https://github.com/ether/etherpad-lite/issues/2802');
|
||||||
|
console.error(err.stack || err.toString());
|
||||||
}
|
}
|
||||||
curSplice[sline] = curSplice[sline].substring(0, curCol) + text +
|
curSplice[sline] = curSplice[sline].substring(0, curCol) + text +
|
||||||
curSplice[sline].substring(curCol);
|
curSplice[sline].substring(curCol);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue