Exception: Cisco::UnsupportedError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/cisco_node_utils/command_reference.rb

Overview

Exception class raised when a particular feature/attribute is explicitly excluded on the given node.

Instance Method Summary collapse

Constructor Details

#initialize(feature, name, oper = nil, msg = nil) ⇒ UnsupportedError

Returns a new instance of UnsupportedError.



229
230
231
232
233
234
235
236
237
238
239
# File 'lib/cisco_node_utils/command_reference.rb', line 229

def initialize(feature, name, oper=nil, msg=nil)
  @feature = feature
  @name = name
  @oper = oper
  message = "Feature '#{feature}'"
  message += ", attribute '#{name}'" unless name.nil?
  message += ", operation '#{oper}'" unless oper.nil?
  message += ' is unsupported on this node'
  message += ": #{msg}" unless msg.nil?
  super(message)
end