better reporting
This commit is contained in:
1 parent
8d97ab26a9
commit
1633cca07a
2 files changed
+3
-11
No files matched your search
@@ -1004,15 +1004,7 @@ public class CarpetScriptHost extends ScriptHost
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String shebang = message;
|
String shebang = message+" in "+expr.getModuleName();
|
||||||
if (expr.module != null)
|
|
||||||
{
|
|
||||||
shebang += " in " + expr.module.getName() + "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
shebang += " in system chat";
|
|
||||||
}
|
|
||||||
if (token != null)
|
if (token != null)
|
||||||
{
|
{
|
||||||
String[] lines = expr.getCodeString().split("\n");
|
String[] lines = expr.getCodeString().split("\n");
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class Expression
|
|||||||
|
|
||||||
public String getModuleName()
|
public String getModuleName()
|
||||||
{
|
{
|
||||||
return module == null?null:module.getName();
|
return module == null?"system chat":module.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void asATextSource()
|
public void asATextSource()
|
||||||
@@ -1072,7 +1072,7 @@ public class Expression
|
|||||||
if (!CarpetSettings.scriptsOptimization)
|
if (!CarpetSettings.scriptsOptimization)
|
||||||
return root.op;
|
return root.op;
|
||||||
|
|
||||||
CarpetScriptServer.LOG.info("Input code size: " + treeSize(root) + " nodes, " + treeDepth(root) + " deep");
|
CarpetScriptServer.LOG.info("Input code size for "+getModuleName()+": " + treeSize(root) + " nodes, " + treeDepth(root) + " deep");
|
||||||
|
|
||||||
boolean changed = true;
|
boolean changed = true;
|
||||||
while(changed) {
|
while(changed) {
|
||||||
|
|||||||
Reference in new issue
Block a user