Index: hbase-shell/src/main/ruby/shell/commands.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands.rb (revision 1567874) +++ hbase-shell/src/main/ruby/shell/commands.rb (working copy) @@ -95,14 +95,19 @@ # Get the special java exception which will be handled cause = e.cause if cause.kind_of?(org.apache.hadoop.hbase.TableNotFoundException) then - raise "Unknown table #{args.first}!" + raise "Unknown table #{cause.message}!" end - if cause.kind_of?(org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException) then - valid_cols = table(args.first).get_all_columns.map { |c| c + '*' } - raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}" + if cause.kind_of?(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException) then + exceptions = cause.getCauses + exceptions.each do |exception| + if exception.kind_of?(org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException) then + valid_cols = table(args.first).get_all_columns.map { |c| c + '*' } + raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}" + end + end end if cause.kind_of?(org.apache.hadoop.hbase.TableExistsException) then - raise "Table already exists: #{args.first}!" + raise "Table already exists: #{cause.message}!" end # To be safe, here only AccessDeniedException is considered. In future # we might support more in more generic approach when possible.