diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index 54fa204048e..bb69fd6c4c0 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -95,8 +95,8 @@ module Shell # Get the special java exception which will be handled cause = e.cause if cause.kind_of?(org.apache.hadoop.hbase.TableNotFoundException) then - str = java.lang.String.new("#{cause}") - raise "Unknown table #{str}!" + first_arg = args.first + raise "Unknown table #{first_arg}!" end if cause.kind_of?(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException) then exceptions = cause.getCauses @@ -105,6 +105,10 @@ module Shell valid_cols = table(args.first).get_all_columns.map { |c| c + '*' } raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}" end + if exception.kind_of?(org.apache.hadoop.hbase.TableNotFoundException) then + first_arg = args.first + raise "Unknown table #{first_arg}!" + end end end if cause.kind_of?(org.apache.hadoop.hbase.TableExistsException) then