HBASE-27726 Handling of ruby shell SyntaxError exceptions (#5147)

Co-authored-by: Rishabh Murarka <rmurarka@visa.com>
This commit is contained in:
Rishabh Murarka 2023-03-28 16:45:47 +05:30 committed by Rajeshbabu Chintaguntla
parent b0b03732d3
commit 912b6d18c0
1 changed files with 2 additions and 0 deletions

View File

@ -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.