mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 12:33:54 +00:00
Cleanup and a few bugfixes
This commit is contained in:
@ -52,9 +52,9 @@ public class RhinoCraftScriptEngine implements CraftScriptEngine {
|
||||
throw new ScriptException(e.getMessage());
|
||||
} catch (RhinoException e) {
|
||||
if (e instanceof WrappedException) {
|
||||
Throwable cause = ((WrappedException)e).getCause();
|
||||
Throwable cause = ((WrappedException) e).getCause();
|
||||
if (cause instanceof WorldEditException) {
|
||||
throw ((WrappedException)e).getCause();
|
||||
throw ((WrappedException) e).getCause();
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ public class RhinoCraftScriptEngine implements CraftScriptEngine {
|
||||
int line = (line = e.lineNumber()) == 0 ? -1 : line;
|
||||
|
||||
if (e instanceof JavaScriptException) {
|
||||
msg = String.valueOf(((JavaScriptException)e).getValue());
|
||||
msg = String.valueOf(((JavaScriptException) e).getValue());
|
||||
} else {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class RhinoScriptEngine extends AbstractScriptEngine {
|
||||
|
||||
Scriptable scope = setupScope(cx, context);
|
||||
|
||||
String filename = (filename = (String)get(ScriptEngine.FILENAME)) == null
|
||||
String filename = (filename = (String) get(ScriptEngine.FILENAME)) == null
|
||||
? "<unknown>" : filename;
|
||||
|
||||
try {
|
||||
@ -52,7 +52,7 @@ public class RhinoScriptEngine extends AbstractScriptEngine {
|
||||
int line = (line = e.lineNumber()) == 0 ? -1 : line;
|
||||
|
||||
if (e instanceof JavaScriptException) {
|
||||
msg = String.valueOf(((JavaScriptException)e).getValue());
|
||||
msg = String.valueOf(((JavaScriptException) e).getValue());
|
||||
} else {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
@ -72,7 +72,7 @@ public class RhinoScriptEngine extends AbstractScriptEngine {
|
||||
|
||||
Scriptable scope = setupScope(cx, context);
|
||||
|
||||
String filename = (filename = (String)get(ScriptEngine.FILENAME)) == null
|
||||
String filename = (filename = (String) get(ScriptEngine.FILENAME)) == null
|
||||
? "<unknown>" : filename;
|
||||
|
||||
try {
|
||||
@ -82,7 +82,7 @@ public class RhinoScriptEngine extends AbstractScriptEngine {
|
||||
int line = (line = e.lineNumber()) == 0 ? -1 : line;
|
||||
|
||||
if (e instanceof JavaScriptException) {
|
||||
msg = String.valueOf(((JavaScriptException)e).getValue());
|
||||
msg = String.valueOf(((JavaScriptException) e).getValue());
|
||||
} else {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
|
Reference in New Issue
Block a user