Only capture "ENOENT"s in "FileStore"

Reviewed By: jeanlauliac

Differential Revision: D7111352

fbshipit-source-id: 97525051e58482d7f0604cd9c3e50183db83d455
This commit is contained in:
Miguel Jimenez Esun 2018-03-01 05:30:35 -08:00 committed by Facebook Github Bot
parent 123f1cfd42
commit cfb8516925

View File

@ -38,8 +38,12 @@ class FileStore {
try {
return serializer.readFileSync(this._getFilePath(key));
} catch (err) {
if (err.code === 'ENOENT') {
return null;
}
throw err;
}
}
set(key: Buffer, value: TransformedCode): void {