Exception: UPnP::Control::Service::UPnPError
- Defined in:
- lib/UPnP/control/service.rb
Overview
Error raised when there was an error while calling an action
Instance Attribute Summary collapse
-
#code ⇒ Object
The UPnP fault code.
-
#description ⇒ Object
The UPnP fault description.
Instance Method Summary collapse
-
#initialize(description, code) ⇒ UPnPError
constructor
Creates a new UPnP error using
description
andcode
. -
#to_s ⇒ Object
Error string including code and description.
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
#code ⇒ Object
The UPnP fault code
41 42 43 |
# File 'lib/UPnP/control/service.rb', line 41 def code @code end |
#description ⇒ Object
The UPnP fault description
46 47 48 |
# File 'lib/UPnP/control/service.rb', line 46 def description @description end |
Instance Method Details
#to_s ⇒ Object
Error string including code and description
59 60 61 |
# File 'lib/UPnP/control/service.rb', line 59 def to_s "#{@description} (#{@code})" end |