Exception: Morpheus::Cli::CommandArgumentsError

Inherits:
CommandError
  • Object
show all
Defined in:
lib/morpheus/cli/errors.rb

Overview

An error for wrong number of arguments could use ::OptionParser::MissingArgument, ::OptionParser::NeedlessArgument maybe return an error code other than 1?

Instance Attribute Summary

Attributes inherited from CommandError

#args, #exit_code, #optparse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CommandArgumentsError.



31
32
33
# File 'lib/morpheus/cli/errors.rb', line 31

def initialize(msg, args=[], optparse=nil, exit_code=nil)
  super(msg, args, optparse, exit_code || 1)
end