Thrown by certain methods when an externally-called command exits nonzero

Methods
N
Attributes
[R] command

The command that caused the failure

Class Public methods
new(exit_code,command,custom_error_message = nil)
exit_code

exit code of the command that caused this

command

the entire command-line that caused this

custom_error_message

an error message to show the user instead of the boilerplate one. Useful for allowing this exception to bubble up and exit the program, but to give the user something actionable.

# File lib/optparse_plus/error.rb, line 26
def initialize(exit_code,command,custom_error_message = nil)
  error_message = String(custom_error_message).empty? ?  "Command '#{command}' exited #{exit_code}" : custom_error_message
  super(exit_code,error_message)
  @command = command
end