|
From: <ha...@us...> - 2007-10-03 20:35:21
|
Revision: 1774
http://cogkit.svn.sourceforge.net/cogkit/?rev=1774&view=rev
Author: hategan
Date: 2007-10-03 13:35:19 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
also catch and report errors; they usually end up quietly in a log, so the desire is to make as much noise as possible
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java 2007-10-03 16:12:31 UTC (rev 1773)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java 2007-10-03 20:35:19 UTC (rev 1774)
@@ -20,6 +20,8 @@
public final class EventBus {
public static final Logger logger = Logger.getLogger(EventBus.class);
+
+ public static final boolean TRACE_EVENTS = false;
private static final EventBus bus = new EventBus();
public volatile static long eventCount;
@@ -116,7 +118,7 @@
public static void send(final EventListener l, final Event event) {
try {
- if (logger.isDebugEnabled()) {
+ if (TRACE_EVENTS) {
logger.debug(event + " -> " + l);
}
if (l != null) {
@@ -143,7 +145,7 @@
logger.fatal("Exception was", e);
}
}
- catch (Exception e) {
+ catch (Throwable e) {
try {
logger.warn("Uncaught exception: " + e.toString() + " in " + l, e);
logger.warn("Event was " + event);
@@ -157,7 +159,7 @@
logger.fatal("Cannot fail element", ee);
}
}
- catch (Exception ee) {
+ catch (Throwable ee) {
logger.warn("Another uncaught exception while handling an uncaught exception.", ee);
logger.warn("The initial exception was", e);
try {
@@ -167,7 +169,7 @@
+ e.toString() + "\n" + ee.toString());
}
}
- catch (Exception eee) {
+ catch (Throwable eee) {
logger.fatal("Cannot fail element", ee);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|