Author: eli Date: Mon Jul 16 21:26:58 2012 New Revision: 1362270 URL: http://svn.apache.org/viewvc?rev=1362270&view=rev Log: HDFS-3666. Plumb more exception messages to terminate. Contributed by Eli Collins
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java?rev=1362270&r1=1362269&r2=1362270&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java Mon Jul 16 21:26:58 2012 @@ -85,9 +85,19 @@ public final class ExitUtil { } /** + * Like {@link terminate(int, String)} but takes an exception to + * @param status + * @param t Exception + * @throws ExitException if System.exit is disabled for test purposes + */ + public static void terminate(int status, Throwable t) throws ExitException { + terminate(status, t.getMessage()); + } + + /** * Like {@link terminate(int, String)} without a message. * @param status - * @throws ExitException + * @throws ExitException if System.exit is disabled for test purposes */ public static void terminate(int status) throws ExitException { terminate(status, "ExitException");