Skip to content

Commit c7c10cd

Browse files
[GR-37001] Backport to 21.3: update ES module loading error message.
PullRequest: js/2335
2 parents 5caf150 + 2f25432 commit c7c10cd

File tree

2 files changed

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

2 files changed

+4
-4
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 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
@@ -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)