mirror of https://github.com/apache/cassandra
add defaultuncaughtexceptionhandler that logs runtime errors
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@759735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fad316df6
commit
cbcfb44bbe
|
|
@ -853,6 +853,15 @@ public class CassandraServer extends FacebookBase implements Cassandra.Iface
|
|||
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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue