Sha256: 63b21b082492b8a9a764859c19ce1edee33c1b80505bd26c33838b4d56bc3e52

Contents?: true

Size: 376 Bytes

Versions: 13

Compression:

Stored size: 376 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(exception)
      new_literal GIR_FFI_DOMAIN, 0, exception.message
    end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/ffi-glib/error.rb
gir_ffi-0.16.1 lib/ffi-glib/error.rb
gir_ffi-0.16.0 lib/ffi-glib/error.rb
gir_ffi-0.15.9 lib/ffi-glib/error.rb
gir_ffi-0.15.8 lib/ffi-glib/error.rb
gir_ffi-0.15.7 lib/ffi-glib/error.rb
gir_ffi-0.15.6 lib/ffi-glib/error.rb
gir_ffi-0.15.5 lib/ffi-glib/error.rb
gir_ffi-0.15.4 lib/ffi-glib/error.rb
gir_ffi-0.15.3 lib/ffi-glib/error.rb
gir_ffi-0.15.2 lib/ffi-glib/error.rb
gir_ffi-0.15.1 lib/ffi-glib/error.rb
gir_ffi-0.15.0 lib/ffi-glib/error.rb