Logging varagification, associated stack traces.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5587 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2008-12-10 01:05:41 +00:00
parent 49f2bdb493
commit 7c979eb436
+7 -10
View File
@@ -83,9 +83,8 @@ public class DObject // extends EventDispatcher
_listeners = [ ]; _listeners = [ ];
} else if (_listeners.indexOf(listener) != -1) { } else if (_listeners.indexOf(listener) != -1) {
log.warning("Refusing repeat listener registration " + log.warning("Refusing repeat listener registration",
"[dobj=" + which() + ", list=" + listener + "]."); "dobj", which(), "list", listener, new Error());
log.logStackTrace(new Error());
return; return;
} }
_listeners.push(listener); _listeners.push(listener);
@@ -121,9 +120,8 @@ public class DObject // extends EventDispatcher
(listener as EventListener).eventReceived(event); (listener as EventListener).eventReceived(event);
} }
} catch (e :Error) { } catch (e :Error) {
log.warning("Listener choked during notification " + log.warning("Listener choked during notification",
"[list=" + listener + ", event=" + event + "]."); "list", listener, "event", event, e);
log.logStackTrace(e);
} }
} }
} }
@@ -149,9 +147,8 @@ public class DObject // extends EventDispatcher
_omgr.postEvent(event); _omgr.postEvent(event);
} else { } else {
log.warning("Unable to post event, object has no omgr " + log.warning("Unable to post event, object has no omgr",
"[oid=" + getOid() + ", class=" + ClassUtil.getClassName(this) + "oid", getOid(), "class", ClassUtil.getClassName(this), "event", event);
", event=" + event + "].");
} }
} }
@@ -286,7 +283,7 @@ public class DObject // extends EventDispatcher
{ {
// sanity check // sanity check
if (_tcount != 0) { if (_tcount != 0) {
log.warning("Transaction cleared with non-zero nesting count [dobj=" + this + "]."); log.warning("Transaction cleared with non-zero nesting count", "dobj", this);
_tcount = 0; _tcount = 0;
} }