Improved scripting error messages.

This commit is contained in:
sk89q
2011-01-22 16:23:04 -08:00
parent e94e1e29ce
commit 768ff9387c
3 changed files with 17 additions and 3 deletions

View File

@ -2203,13 +2203,15 @@ public class WorldEditController {
} catch (ScriptException e) {
player.printError("Failed to execute:");;
player.printRaw(e.getMessage());
e.printStackTrace();
} catch (NumberFormatException e) {
throw e;
} catch (WorldEditException e) {
throw e;
} catch (Throwable e) {
player.printError("Failed to execute (exception):");
player.printError("Failed to execute (see console):");
player.printRaw(e.getClass().getCanonicalName());
e.printStackTrace();
} finally {
for (EditSession editSession : scriptContext.getEditSessions()) {
session.remember(editSession);