Cleanup and a few bugfixes

This commit is contained in:
Wizjany
2011-09-24 15:24:10 -04:00
parent a2e23fedf7
commit b5b55a2775
30 changed files with 170 additions and 191 deletions

View File

@ -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();
}

View File

@ -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();
}