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.
111 112 113 114 |
# File 'lib/ds9.rb', line 111 def initialize str, code @code = code super(str) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
109 110 111 |
# File 'lib/ds9.rb', line 109 def code @code end |
Class Method Details
.abort(code) ⇒ Object
105 106 107 |
# File 'lib/ds9.rb', line 105 def self.abort code raise new(to_string(code), code) end |
.to_string(err) ⇒ Object
939 940 941 942 |
# File 'ext/ds9/ds9.c', line 939
static VALUE errors_to_string(VALUE mod, VALUE err)
{
return rb_usascii_str_new2(nghttp2_strerror(NUM2INT(err)));
}
|