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(it) ⇒ Object



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

def self.from(it)
  from_exception it
end

.from_exception(ex) ⇒ Object



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

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