Exception: GirFFI::GLibError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- GirFFI::GLibError
- Defined in:
- lib/gir_ffi/glib_error.rb
Overview
Exception class to be raised whenever an error is signaled through GLib::Error.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#domain_quark ⇒ Object
readonly
Returns the value of attribute domain_quark.
Instance Method Summary collapse
- #domain ⇒ Object
-
#initialize(g_error) ⇒ GLibError
constructor
A new instance of GLibError.
Constructor Details
#initialize(g_error) ⇒ GLibError
Returns a new instance of GLibError.
9 10 11 12 13 |
# File 'lib/gir_ffi/glib_error.rb', line 9 def initialize(g_error) @domain_quark = g_error.domain @code = g_error.code super g_error. end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/gir_ffi/glib_error.rb', line 7 def code @code end |
#domain_quark ⇒ Object (readonly)
Returns the value of attribute domain_quark.
6 7 8 |
# File 'lib/gir_ffi/glib_error.rb', line 6 def domain_quark @domain_quark end |
Instance Method Details
#domain ⇒ Object
15 16 17 |
# File 'lib/gir_ffi/glib_error.rb', line 15 def domain @domain ||= GLib.quark_to_string @domain_quark end |