Skip to content

Commit 8376832

Browse files
eleinadaniTheTaha-Alamine
authored andcommitted
Update ES module loading error message
(cherry picked from commit 7f9b298)
1 parent 5caf150 commit 8376832

File tree

2 files changed

+3
-3
lines changed
  • graal-js/src

2 files changed

+3
-3
lines changed

graal-js/src/com.oracle.truffle.js.test/src/com/oracle/truffle/js/test/interop/MLEBuiltinTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -144,7 +144,7 @@ public void testUnknownSymbol() throws IOException {
144144
cx.eval(src);
145145
} catch (PolyglotException e) {
146146
failed = true;
147-
assertEquals("Error: Custom ESM mapping not found for specifier: wrong", e.getMessage());
147+
assertEquals("Error: Cannot load ES module: wrong", e.getMessage());
148148
} finally {
149149
cx.close();
150150
}

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/JSRealm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,7 @@ public String getCustomEsmPathMapping(String refPath, String specifier) {
24792479
throw Errors.shouldNotReachHere(e);
24802480
}
24812481
} else {
2482-
throw Errors.createError("Custom ESM mapping not found for specifier: " + specifier);
2482+
throw Errors.createError("Cannot load ES module: " + specifier);
24832483
}
24842484
}
24852485
return null;

0 commit comments

Comments
 (0)