From fd650ed3bd7ae6d7e831a230af2bdf9140fb680a Mon Sep 17 00:00:00 2001 From: Sergey Soldatov Date: Thu, 11 Jan 2018 13:28:25 -0800 Subject: HBASE-19775 hbase shell doesn't handle the exceptions that are wrapped in java.io.UncheckedIOException --- hbase-shell/src/main/ruby/shell/commands.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index f17a7f6..5bdc5d6 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -109,6 +109,9 @@ module Shell rescue => cause # let individual command handle exceptions first handle_exceptions(cause, *args) if respond_to?(:handle_exceptions) + if cause.is_a?(java.io.UncheckedIOException) + cause = cause.getCause() + end # Global HBase exception handling below if not handled by respective command above if cause.is_a?(org.apache.hadoop.hbase.TableNotFoundException) raise "Unknown table #{args.first}!" -- 2.5.4 (Apple Git-61)