Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap gi.require with assert in class.lua and ffi.lua
Fixes #71 Calling gi.require may not always succeed. If we do not wrap it in an `assert`, we will get confusing error messages. For example, a failure in `lgi/ffi.lua` would look like: attempt to index local 'gobject' (a boolean value) wrapping `gi.require` with `assert` instead would show a more informative message: Typelib file for namespace 'win32', version '1.0' not found This change updates both `lgi/class.lua` and `lgi/ffi.lua` which appear to be the only two files in the codebase that do not wrap `gi.require` with an `assert`.
- Loading branch information