improve exception message when we can't find a file

Summary:
in ```fastfs.js ``` when ```getFile()``` got a exception it will print ``` Unable to find file with path: null ``` in terminal .

It's  confused
Closes https://github.com/facebook/react-native/pull/4737

Reviewed By: svcscm

Differential Revision: D2752888

Pulled By: androidtrunkagent

fb-gh-sync-id: a366da1eea27c691248dcb17019f4462a639ea70
This commit is contained in:
WanderWang 2015-12-12 17:26:22 -08:00 committed by facebook-github-bot-9
parent ab09248540
commit 26102c3934
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class Fastfs extends EventEmitter {
readFile(filePath) {
const file = this._getFile(filePath);
if (!file) {
throw new Error(`Unable to find file with path: ${file}`);
throw new Error(`Unable to find file with path: ${filePath}`);
}
return file.read();
}