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
@ -1712,6 +1712,7 @@ public class CommandProcessor {
|
||||
// called after debuggee attach
|
||||
private void postAttach() {
|
||||
// create JavaScript engine and start it
|
||||
try {
|
||||
jsengine = new JSJavaScriptEngine() {
|
||||
private ObjectReader reader = new ObjectReader();
|
||||
private JSJavaFactory factory = new JSJavaFactoryImpl();
|
||||
@ -1747,6 +1748,13 @@ public class CommandProcessor {
|
||||
}
|
||||
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) {
|
||||
commands.put(cmd, new Command(cmd, usage, false) {
|
||||
|
Loading…
Reference in New Issue
Block a user