log errors when copying files from cache

This commit is contained in:
Brian Gough
2015-04-29 15:54:08 +01:00
parent 143f948193
commit 85c6c3fe2b

View File

@@ -62,6 +62,8 @@ module.exports = UrlCache =
_copyFile: (from, to, _callback = (error) ->) -> _copyFile: (from, to, _callback = (error) ->) ->
callbackOnce = (error) -> callbackOnce = (error) ->
if error?
logger.error err: error, from:from, to:to, "error copying file from cache"
_callback(error) _callback(error)
_callback = () -> _callback = () ->
writeStream = fs.createWriteStream(to) writeStream = fs.createWriteStream(to)