From 7ea1123d785f052de19108a04ee518f2a709dd86 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 (cherry picked from commit 912b6d18c03ef631bcaaaa5d7d12ef11213aad55) Change-Id: Ic0efc56fb1f78f7299da867f596056496f1d6655 --- 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 7fc409124895..713cb848c764 100644 --- a/hbase-shell/src/main/ruby/irb/hirb.rb +++ b/hbase-shell/src/main/ruby/irb/hirb.rb @@ -118,6 +118,8 @@ def eval_input 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.