Exception: NIS::YPError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- NIS::YPError
- 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
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ YPError
constructor
A new instance of YPError.
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, ) super() @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
30 31 32 |
# File 'lib/nis-ffi.rb', line 30 def code @code end |