Sha256: 939318290d3a44c488469241c78703e293d8180c6024aba28d02effd46efd2a6

Contents?: true

Size: 359 Bytes

Versions: 9

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true
GLib.load_class :Error

module GLib
  # Overrides for GError, used by GLib for handling non-fatal errors.
  class Error
    GIR_FFI_DOMAIN = GLib.quark_from_string('gir_ffi')

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

    def self.from(it)
      from_exception it
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/ffi-glib/error.rb
gir_ffi-0.11.0 lib/ffi-glib/error.rb
gir_ffi-0.10.2 lib/ffi-glib/error.rb
gir_ffi-0.10.1 lib/ffi-glib/error.rb
gir_ffi-0.10.0 lib/ffi-glib/error.rb
gir_ffi-0.10.0.pre1 lib/ffi-glib/error.rb
gir_ffi-0.9.5 lib/ffi-glib/error.rb
gir_ffi-0.9.4 lib/ffi-glib/error.rb
gir_ffi-0.9.3 lib/ffi-glib/error.rb