bitoffdev commented on a change in pull request #2232:
URL: https://github.com/apache/hbase/pull/2232#discussion_r468061263



##########
File path: hbase-shell/src/main/ruby/shell.rb
##########
@@ -335,12 +348,9 @@ def eval_io(io)
         # Include the 'ERROR' string to try to make transition easier for 
scripts that
         # may have already been relying on grepping output.
         puts "ERROR #{e.class}: #{message}"
-        if $fullBacktrace
-          # re-raising the will include a backtrace and exit.
-          raise e
-        else
-          exit 1
-        end
+        raise e unless hide_traceback
+
+        exit 1

Review comment:
       Ruby allows one-line conditionals such as `<statement> if <condition>`, 
which is equivalent to `if <condition>; <statement>; end`. It's a fun feature 
of Ruby :smile:.
   
   So, this logic will raise SystemExit (via `exit 1`) if we want to hide the 
traceback.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to