From 912b6d18c03ef631bcaaaa5d7d12ef11213aad55 Mon Sep 17 00:00:00 2001 From: Rishabh Murarka Date: Tue, 28 Mar 2023 16:45:47 +0530 Subject: [PATCH] HBASE-27726 Handling of ruby shell SyntaxError exceptions (#5147) Co-authored-by: Rishabh Murarka --- hbase-shell/src/main/ruby/irb/hirb.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hbase-shell/src/main/ruby/irb/hirb.rb b/hbase-shell/src/main/ruby/irb/hirb.rb index 7fc40912489..713cb848c76 100644 --- a/hbase-shell/src/main/ruby/irb/hirb.rb +++ b/hbase-shell/src/main/ruby/irb/hirb.rb @@ -118,6 +118,8 @@ module IRB rescue Interrupt => exc rescue SystemExit, SignalException raise + rescue SyntaxError => exc + raise exc unless @interactive rescue NameError => exc raise exc unless @interactive # HBASE-26880: Ignore NameError to prevent exiting Shell on mistyped commands.