Method: Beaker::Subcommands::SubcommandUtil.error_with
- Defined in:
- lib/beaker/subcommands/subcommand_util.rb
.error_with(msg, options = {}) ⇒ Object
Print a message to the console and exit with specified exit code, defaults to 1 @param [String] msg the message to output
51 52 53 54 55 56 |
# File 'lib/beaker/subcommands/subcommand_util.rb', line 51 def self.error_with(msg, ={}) puts msg puts [:stack_trace] if [:stack_trace] exit_code = [:exit_code] ? [:exit_code] : 1 exit(exit_code) end |