mirror of https://github.com/status-im/metro.git
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:
parent
ab09248540
commit
26102c3934
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue