Exception: Cisco::UnsupportedError

Inherits:
CiscoError
  • Object
show all
Defined in:
lib/cisco_node_utils/exceptions.rb

Overview

Exception class raised by CommandReference to indicate that a particular feature/attribute is explicitly excluded on the given node.

Instance Attribute Summary

Attributes inherited from CiscoError

#kwargs

Instance Method Summary collapse

Methods inherited from CiscoError

#method_missing, #respond_to?

Constructor Details

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

Returns a new instance of UnsupportedError


131
132
133
134
135
136
137
138
# File 'lib/cisco_node_utils/exceptions.rb', line 131

def initialize(feature, name, oper=nil, msg=nil)
  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, feature: feature, name: name, oper: oper)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Cisco::CiscoError