142143144145146147148149150151152
sawNonNull = true; sum += d; }catch(RuntimeException exp) { int errCode = 2103; String msg = "Problem while computing sum of doubles."; throw new ExecException(msg, errCode, PigException.BUG, exp); } } if(sawNonNull) { return new Double(sum);
174175176177178179180181
} catch (ExecException ee) { throw ee; } catch (Exception e) { int errCode = 2106; String msg = "Error while computing sum in " + this.getClass().getSimpleName(); throw new ExecException(msg, errCode, PigException.BUG, e); } }
101102103104105106107108109110111
}}); } @Test public void wrapsExecutionFailure() { final ExecException failure = new ExecException(null); task.setDestinationDir(destDir); task.source(srcDir); expectJavadocExecHandle();