Class: GLib::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/ffi-glib/error.rb

Overview

Overrides for GError, used by GLib for handling non-fatal errors.

Constant Summary collapse

GIR_FFI_DOMAIN =
GLib.quark_from_string("gir_ffi")

Class Method Summary collapse

Class Method Details

.from(obj) ⇒ Object



14
15
16
# File 'lib/ffi-glib/error.rb', line 14

def self.from(obj)
  from_exception obj
end

.from_exception(exception) ⇒ Object



10
11
12
# File 'lib/ffi-glib/error.rb', line 10

def self.from_exception(exception)
  new_literal GIR_FFI_DOMAIN, 0, exception.message
end