mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
trim output when error occurs
This commit is contained in:
parent
3bbd0d49a9
commit
00153e61ad
1 changed files with 2 additions and 2 deletions
|
@ -17,12 +17,12 @@ class ASpellWorker
|
|||
metrics.inc "aspellWorker-exit-" + @language
|
||||
@pipe.on 'error', (err) =>
|
||||
@state = 'error' unless @state == 'killed'
|
||||
logger.log process: @pipe.pid, error: err, stdout: output, stderr: error, lang: @language, "aspell worker error"
|
||||
logger.log process: @pipe.pid, error: err, stdout: output.slice(-1024), stderr: error.slice(-1024), lang: @language, "aspell worker error"
|
||||
if @callback?
|
||||
@callback err, []
|
||||
@pipe.stdin.on 'error', (err) =>
|
||||
@state = 'error' unless @state == 'killed'
|
||||
logger.log process: @pipe.pid, error: err, stdout: output, stderr: error, lang: @language, "aspell worker error on stdin"
|
||||
logger.log process: @pipe.pid, error: err, stdout: output.slice(-1024), stderr: error.slice(-1024), lang: @language, "aspell worker error on stdin"
|
||||
if @callback?
|
||||
@callback err, []
|
||||
|
||||
|
|
Loading…
Reference in a new issue