mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 10:47:30 +00:00
More debugging stuff
This commit is contained in:
1 parent
5e48063311
commit
ffd331fbc5
2 files changed
+5
-6
No files matched your search
@@ -265,7 +265,7 @@ public class Action implements IAction {
|
||||
task.accept(this);
|
||||
count++;
|
||||
} catch (Throwable t) {
|
||||
String err = "IAction '" + name + "' threw an exception:";
|
||||
String err = "Task of " + this + " threw an exception:";
|
||||
|
||||
if (reportTo != null)
|
||||
reportTo.appendConsole(err + "\n" + ExceptionUtils.getStackTrace(t));
|
||||
@@ -287,7 +287,7 @@ public class Action implements IAction {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return String.format("Action '%s' [queue='%s', scheduled=%s, done=%s, paused=%s, updateEvery=%s, duration=%d/%d, count=%d/%d, threaded=%s]", name != null ? name : "unnamed", queue != null ? queue.getName() : "null", isScheduled, done, isPaused(), updateEveryXTick, duration, maxDuration, count, maxCount, isThreaded);
|
||||
return String.format("IAction '%s' [queue='%s', scheduled=%s, done=%s, paused=%s, updateEvery=%s, duration=%d/%d, count=%d/%d, threaded=%s]", name != null ? name : "unnamed", queue != null ? queue.getName() : "null", isScheduled, done, isPaused(), updateEveryXTick, duration, maxDuration, count, maxCount, isThreaded);
|
||||
}
|
||||
///////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
@@ -134,7 +134,7 @@ public class ConditionalAction extends Action implements IConditionalAction {
|
||||
count++;
|
||||
taskExecuted = true;
|
||||
} catch (Throwable t) {
|
||||
String err = "IConditionalAction '" + getName() + "' threw an exception:";
|
||||
String err = "Task of " + this + " threw an exception:";
|
||||
|
||||
if (reportTo != null)
|
||||
reportTo.appendConsole(err + "\n" + ExceptionUtils.getStackTrace(t));
|
||||
@@ -149,7 +149,7 @@ public class ConditionalAction extends Action implements IConditionalAction {
|
||||
try {
|
||||
onTermination.accept(this);
|
||||
} catch (Throwable t) {
|
||||
String err = "IConditionalAction's onTermination '" + getName() + "' threw an exception:";
|
||||
String err = "Termination Task of " + this + " threw an exception:";
|
||||
|
||||
if (reportTo != null)
|
||||
reportTo.appendConsole(err + "\n" + ExceptionUtils.getStackTrace(t));
|
||||
@@ -161,8 +161,7 @@ public class ConditionalAction extends Action implements IConditionalAction {
|
||||
|
||||
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"ConditionalAction '%s' [queue='%s', scheduled=%s, done=%s, paused=%s, updateEvery=%s, duration=%d/%d, count=%d/%d, checks=%d/%d, taskExecuted=%s, threaded=%s]",
|
||||
return String.format("IConditionalAction '%s' [queue='%s', scheduled=%s, done=%s, paused=%s, updateEvery=%s, duration=%d/%d, count=%d/%d, checks=%d/%d, taskExecuted=%s, threaded=%s]",
|
||||
name != null ? name : "unnamed",
|
||||
queue != null ? queue.getName() : "null",
|
||||
isScheduled,
|
||||
|
||||
Reference in new issue
Block a user