Exception: Winwatch::OSError

Inherits:
Error
  • Object
show all
Defined in:
lib/winwatch.rb,
lib/winwatch.rb,
ext/winwatch/winwatch.c

Overview

OSError subclasses get a tiny ctor so the :winloop first-issue handoff can raise the same shape the C open path would (message + @code).

Direct Known Subclasses

AccessDenied, NotFound, Unsupported

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_with_code(api, code) ⇒ Object



682
683
684
685
686
# File 'lib/winwatch.rb', line 682

def self.new_with_code(api, code)
  exc = new("#{api} failed (error #{code})")
  exc.instance_variable_set(:@code, code)
  exc
end

Instance Method Details

#codeObject



66
67
68
# File 'lib/winwatch.rb', line 66

def code
  @code
end