Make sure to catch any error while processing our events, not just when
actually dispatching the event to subscribers. We can't trust anyone. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3308 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -202,11 +202,19 @@ public class PresentsDObjectMgr
|
|||||||
start = _timer.highResCounter();
|
start = _timer.highResCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if this is a runnable, it's just an executable unit that
|
|
||||||
// should be invoked
|
|
||||||
if (unit instanceof Runnable) {
|
|
||||||
try {
|
try {
|
||||||
|
if (unit instanceof Runnable) {
|
||||||
|
// if this is a runnable, it's just an executable unit
|
||||||
|
// that should be invoked
|
||||||
((Runnable)unit).run();
|
((Runnable)unit).run();
|
||||||
|
|
||||||
|
} else if (unit instanceof CompoundEvent) {
|
||||||
|
processCompoundEvent((CompoundEvent)unit);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
processEvent((DEvent)unit);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.warning("Execution unit failed [unit=" + unit + "].");
|
Log.warning("Execution unit failed [unit=" + unit + "].");
|
||||||
Log.logStackTrace(e);
|
Log.logStackTrace(e);
|
||||||
@@ -216,13 +224,6 @@ public class PresentsDObjectMgr
|
|||||||
handleFatalError(unit, soe);
|
handleFatalError(unit, soe);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (unit instanceof CompoundEvent) {
|
|
||||||
processCompoundEvent((CompoundEvent)unit);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
processEvent((DEvent)unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (start != 0L) {
|
if (start != 0L) {
|
||||||
long elapsed = _timer.highResCounter() - start;
|
long elapsed = _timer.highResCounter() - start;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user