mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8152950: BasicLauncherTest.java fails due to type error
Better handle js engine initialization error Reviewed-by: jbachorik
This commit is contained in:
parent
e5e41a2375
commit
0cf2e90d17
1 changed files with 15 additions and 7 deletions
|
@ -1712,6 +1712,7 @@ public class CommandProcessor {
|
||||||
// called after debuggee attach
|
// called after debuggee attach
|
||||||
private void postAttach() {
|
private void postAttach() {
|
||||||
// create JavaScript engine and start it
|
// create JavaScript engine and start it
|
||||||
|
try {
|
||||||
jsengine = new JSJavaScriptEngine() {
|
jsengine = new JSJavaScriptEngine() {
|
||||||
private ObjectReader reader = new ObjectReader();
|
private ObjectReader reader = new ObjectReader();
|
||||||
private JSJavaFactory factory = new JSJavaFactoryImpl();
|
private JSJavaFactory factory = new JSJavaFactoryImpl();
|
||||||
|
@ -1747,6 +1748,13 @@ public class CommandProcessor {
|
||||||
}
|
}
|
||||||
jsengine.start();
|
jsengine.start();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
System.out.println("Warning! JS Engine can't start, some commands will not be available.");
|
||||||
|
if (verboseExceptions) {
|
||||||
|
ex.printStackTrace(out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void registerCommand(String cmd, String usage, final String func) {
|
public void registerCommand(String cmd, String usage, final String func) {
|
||||||
commands.put(cmd, new Command(cmd, usage, false) {
|
commands.put(cmd, new Command(cmd, usage, false) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue