diff --git a/CHANGES.txt b/CHANGES.txt index 9943913de8..65283af5ab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -94,6 +94,9 @@ Trunk (unreleased changes) HADOOP-7098. Tasktracker property not set in conf/hadoop-env.sh. (Bernd Fondermann via tomwhite) + HADOOP-7131. Exceptions thrown by Text methods should include the causing + exception. (Uma Maheswara Rao G via todd) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/java/org/apache/hadoop/io/Text.java b/src/java/org/apache/hadoop/io/Text.java index 3f50e84560..f0470ae4d9 100644 --- a/src/java/org/apache/hadoop/io/Text.java +++ b/src/java/org/apache/hadoop/io/Text.java @@ -195,7 +195,7 @@ public class Text extends BinaryComparable bytes = bb.array(); length = bb.limit(); }catch(CharacterCodingException e) { - throw new RuntimeException("Should not have happened " + e.toString()); + throw new RuntimeException("Should not have happened ", e); } } @@ -269,7 +269,7 @@ public class Text extends BinaryComparable try { return decode(bytes, 0, length); } catch (CharacterCodingException e) { - throw new RuntimeException("Should not have happened " + e.toString()); + throw new RuntimeException("Should not have happened " , e); } }