Exception: DS9::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- DS9::Exception
- Defined in:
- lib/ds9.rb,
ext/ds9/ds9.c
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(str, code) ⇒ Exception
constructor
A new instance of Exception.
Constructor Details
#initialize(str, code) ⇒ Exception
Returns a new instance of Exception.
115 116 117 118 |
# File 'lib/ds9.rb', line 115 def initialize str, code @code = code super(str) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
113 114 115 |
# File 'lib/ds9.rb', line 113 def code @code end |
Class Method Details
.abort(code) ⇒ Object
109 110 111 |
# File 'lib/ds9.rb', line 109 def self.abort code raise new(to_string(code), code) end |
.to_string(err) ⇒ Object
1005 1006 1007 1008 |
# File 'ext/ds9/ds9.c', line 1005
static VALUE errors_to_string(VALUE mod, VALUE err)
{
return rb_usascii_str_new2(nghttp2_strerror(NUM2INT(err)));
}
|