HADOOP-7131. Exceptions thrown by Text methods should include the causing exception. Contributed by Uma Maheswara Rao G.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1078660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2011-03-07 03:16:27 +00:00
parent f2ff6cca37
commit 97dcf05fde
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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);
}
}