Exception: NIS::YPError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/nis-ffi.rb

Overview

Runtime error for yp functions.

Can be raised from each function when something goes wrong (when the return code isn’t 0). Includes the error code and a readable message. The code can be checked against the YPERR constants (e.g. NIS::YPERR_BADARGS).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ YPError

Returns a new instance of YPError.



32
33
34
35
# File 'lib/nis-ffi.rb', line 32

def initialize(code, message)
  super(message)
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



30
31
32
# File 'lib/nis-ffi.rb', line 30

def code
  @code
end