Permit actors to control what portion of their state is displayed in debug output

This commit is contained in:
Tony Garnock-Jones 2014-08-25 13:01:10 -07:00
parent 66670e7f6f
commit 7bb57e2c39
1 changed files with 2 additions and 1 deletions

View File

@ -367,7 +367,8 @@ World.prototype.textProcessTree = function (ownPid) {
var tombstoneString = p.exitReason ? ' (EXITED: ' + p.exitReason + ') ' : ''; var tombstoneString = p.exitReason ? ' (EXITED: ' + p.exitReason + ') ' : '';
var stringifiedState; var stringifiedState;
try { try {
stringifiedState = JSON.stringify(p.behavior, function (k, v) { var rawState = p.behavior.debugState ? p.behavior.debugState() : p.behavior;
stringifiedState = JSON.stringify(rawState, function (k, v) {
return (k === 'name') ? undefined : v; return (k === 'name') ? undefined : v;
}); });
} catch (e) { } catch (e) {