From: <tho...@us...> - 2013-12-16 15:22:36
|
Revision: 7657 http://bigdata.svn.sourceforge.net/bigdata/?rev=7657&view=rev Author: thompsonbry Date: 2013-12-16 15:22:25 +0000 (Mon, 16 Dec 2013) Log Message: ----------- Sync to Martyn with logging to let us observe the thrown cause in the ReadTask when the Future of that task is cancelled. See #724 Modified Paths: -------------- branches/MGC_1_3_0/bigdata/src/java/com/bigdata/ha/pipeline/HAReceiveService.java Modified: branches/MGC_1_3_0/bigdata/src/java/com/bigdata/ha/pipeline/HAReceiveService.java =================================================================== --- branches/MGC_1_3_0/bigdata/src/java/com/bigdata/ha/pipeline/HAReceiveService.java 2013-12-16 15:01:47 UTC (rev 7656) +++ branches/MGC_1_3_0/bigdata/src/java/com/bigdata/ha/pipeline/HAReceiveService.java 2013-12-16 15:22:25 UTC (rev 7657) @@ -914,7 +914,38 @@ @Override public Void call() throws Exception { + + try { + + return doInnerCall(); + + } catch (Throwable t) { + + /* + * Log anything thrown out of this task. We check the Future of + * this task, but that does not tell us what exception is thrown + * in the Thread executing the task when the Future is cancelled + * and that thread is interrupted. In particular, we are looking + * for the InterruptedException, ClosedByInterruptException, + * etc. + */ + + log.error(t, t); + + if (t instanceof Exception) + throw (Exception) t; + + if (t instanceof RuntimeException) + throw (RuntimeException) t; + + throw new RuntimeException(t); + + } + + } + private Void doInnerCall() throws Exception { + // awaitAccept(); // // /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |