cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r759735 - /incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java
Date Sun, 29 Mar 2009 18:18:13 GMT
Author: jbellis
Date: Sun Mar 29 18:18:13 2009
New Revision: 759735

URL: http://svn.apache.org/viewvc?rev=759735&view=rev
Log:
add defaultuncaughtexceptionhandler that logs runtime errors

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java?rev=759735&r1=759734&r2=759735&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java Sun Mar
29 18:18:13 2009
@@ -853,6 +853,15 @@
 	public static void main(String[] args) throws Throwable
 	{
 		int port = DatabaseDescriptor.getThriftPort();
+
+        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()
+        {
+            public void uncaughtException(Thread t, Throwable e)
+            {
+                logger_.error("Fatal exception in thread " + t, e);
+            }
+        });
+
 		try
 		{
 			CassandraServer peerStorageServer = new CassandraServer();



Mime
View raw message