Exception: UPnP::Control::Service::UPnPError

Inherits:
Error
  • Object
show all
Defined in:
lib/UPnP/control/service.rb

Overview

Error raised when there was an error while calling an action

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description, code) ⇒ UPnPError

Creates a new UPnP error using description and code



51
52
53
54
# File 'lib/UPnP/control/service.rb', line 51

def initialize(description, code)
  @code = code
  @description = description
end

Instance Attribute Details

#codeObject

The UPnP fault code



41
42
43
# File 'lib/UPnP/control/service.rb', line 41

def code
  @code
end

#descriptionObject

The UPnP fault description



46
47
48
# File 'lib/UPnP/control/service.rb', line 46

def description
  @description
end

Instance Method Details

#to_sObject

Error string including code and description



59
60
61
# File 'lib/UPnP/control/service.rb', line 59

def to_s
  "#{@description} (#{@code})"
end