mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
added try catch around word count where a file is not created
This commit is contained in:
parent
069220dcc8
commit
253a99e780
1 changed files with 6 additions and 1 deletions
|
@ -120,7 +120,12 @@ module.exports = CompileManager =
|
|||
|
||||
CommandRunner.run project_id, command, directory, timeout, (error) ->
|
||||
return callback(error) if error?
|
||||
try
|
||||
stdout = fs.readFileSync(directory + "/" + file_name + ".wc", "utf-8")
|
||||
catch err
|
||||
logger.err err:err, command:command, directory:directory, project_id:project_id, "error reading word count output"
|
||||
return callback(err)
|
||||
console.log "rooooof"
|
||||
callback null, CompileManager._parseWordcountFromOutput(stdout)
|
||||
|
||||
_parseWordcountFromOutput: (output) ->
|
||||
|
|
Loading…
Reference in a new issue