semi-auto cleanup
This commit is contained in:
1 parent
cad80f82c6
commit
8f61271606
99 files changed
+11463
-8007
No files matched your search
@@ -2,25 +2,28 @@ package carpet.script.exception;
|
||||
|
||||
import carpet.script.value.FunctionValue;
|
||||
import carpet.utils.Messenger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
|
||||
public class CarpetExpressionException extends StacklessRuntimeException implements ResolvedException
|
||||
{
|
||||
public final List<FunctionValue> stack;
|
||||
|
||||
public CarpetExpressionException(String message, List<FunctionValue> stack)
|
||||
public CarpetExpressionException(final String message, final List<FunctionValue> stack)
|
||||
{
|
||||
super(message);
|
||||
this.stack = stack;
|
||||
}
|
||||
public void printStack(CommandSourceStack source)
|
||||
|
||||
public void printStack(final CommandSourceStack source)
|
||||
{
|
||||
if (stack != null && !stack.isEmpty())
|
||||
{
|
||||
for (FunctionValue fun : stack)
|
||||
for (final FunctionValue fun : stack)
|
||||
{
|
||||
Messenger.m(source, "e ... in "+fun.fullName(), "e /"+(fun.getToken().lineno+1)+":"+(fun.getToken().linepos+1));
|
||||
Messenger.m(source, "e ... in " + fun.fullName(), "e /" + (fun.getToken().lineno + 1) + ":" + (fun.getToken().linepos + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user