metro-bundler: AmbiguousModuleResolutionError: provide default message

Reviewed By: davidaurelio

Differential Revision: D5986044

fbshipit-source-id: f61d351f91fed3638177bd3c10702f1cb0742a21
This commit is contained in:
Jean Lauliac 2017-10-09 07:35:20 -07:00 committed by Facebook Github Bot
parent 6c60f61cbd
commit 51d4754efc
1 changed files with 4 additions and 1 deletions

View File

@ -386,7 +386,10 @@ class AmbiguousModuleResolutionError extends Error {
fromModulePath: string,
hasteError: DuplicateHasteCandidatesError,
) {
super();
super(
`Ambiguous module resolution from \`${fromModulePath}\`: ` +
hasteError.message,
);
this.fromModulePath = fromModulePath;
this.hasteError = hasteError;
}