~ubuntu-branches/ubuntu/utopic/ruby-gir-ffi/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/ffi-glib/error.rb

  • Committer: Package Import Robot
  • Author(s): TANIGUCHI Takaki
  • Date: 2014-06-22 16:13:36 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140622161336-zo88bzrlqw71cpyy
Tags: 0.7.4-1
* Imported Upstream version 0.7.4
* Bump Standards-Version to 3.9.5 (with no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module GLib
 
2
  load_class :Error
 
3
 
 
4
  # Overrides for GError, used by GLib for handling non-fatal errors.
 
5
  class Error
 
6
    # TODO: Auto-convert strings and symbols to quarks
 
7
    GIR_FFI_DOMAIN = GLib.quark_from_string("gir_ffi")
 
8
 
 
9
    def self.from_exception ex
 
10
      new_literal GIR_FFI_DOMAIN, 0, ex.message
 
11
    end
 
12
 
 
13
    def self.from it
 
14
      from_exception it
 
15
    end
 
16
  end
 
17
end