Exception: Morpheus::Cli::CommandError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/morpheus/cli/command_error.rb

Overview

A standard error to raise in your CliCommand classes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, args = [], exit_code = nil) ⇒ CommandError

def initialize(msg, args=[], options={})

@args = args
@options = options
super(msg)

end



12
13
14
15
16
# File 'lib/morpheus/cli/command_error.rb', line 12

def initialize(msg, args=[], exit_code=nil)
  @args = args
  @exit_code = exit_code
  super(msg)
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



4
5
6
# File 'lib/morpheus/cli/command_error.rb', line 4

def args
  @args
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



4
5
6
# File 'lib/morpheus/cli/command_error.rb', line 4

def exit_code
  @exit_code
end