class SocketSwitcher::SocketSwitcherError
Attributes
device[RW]
Public Class Methods
for_device(device, message)
click to toggle source
# File lib/socket_switcher/errors.rb, line 3 def self.for_device(device, message) new(message).tap do |error| error.device = device end end
wrap(device, exception)
click to toggle source
# File lib/socket_switcher/errors.rb, line 9 def self.wrap(device, exception) for_device(device, "wrapped #{exception.class}: #{exception}").tap do |e| e.set_backtrace exception.backtrace end end