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 GitHub
parent f5437b9ceb
commit efb360d33f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.