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.
8 9 10 11 12 |
# File 'lib/gir_ffi/glib_error.rb', line 8 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.
6 7 8 |
# File 'lib/gir_ffi/glib_error.rb', line 6 def code @code end |
#domain_quark ⇒ Object (readonly)
Returns the value of attribute domain_quark.
5 6 7 |
# File 'lib/gir_ffi/glib_error.rb', line 5 def domain_quark @domain_quark end |
Instance Method Details
#domain ⇒ Object
14 15 16 |
# File 'lib/gir_ffi/glib_error.rb', line 14 def domain @domain ||= GLib.quark_to_string @domain_quark end |