Author: kturner
Date: Fri Sep 21 22:47:20 2012
New Revision: 1388714
URL: http://svn.apache.org/viewvc?rev=1388714&view=rev
Log:
ACCUMULO-722 made shell insert always print errors (merged from trunk)
Modified:
accumulo/branches/1.4/src/core/ (props changed)
accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
Merged /accumulo/trunk/core:r1388710
Modified:
accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java?rev=1388714&r1=1388713&r2=1388714&view=diff
==============================================================================
---
accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
(original)
+++
accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
Fri Sep 21 22:47:20 2012
@@ -77,6 +77,14 @@ public class InsertCommand extends Comma
for (ConstraintViolationSummary cvs :
e.getConstraintViolationSummaries()) {
lines.add(" " + cvs.toString());
}
+
+ if (lines.size() == 0 || e.getUnknownExceptions() > 0) {
+ // must always print something
+ lines.add(" " + e.getClass().getName() + " : " + e.getMessage());
+ if (e.getCause() != null)
+ lines.add(" Caused by : " + e.getCause().getClass().getName() + "
: " + e.getCause().getMessage());
+ }
+
shellState.printLines(lines.iterator(), false);
}
return 0;