Closed vixalien closed 10 months ago
That said, do you think it's a good idea to cache repos, so that require(lib, version)
always returns the same exact Object instead of creating new ones each time?
This would allow for overriding methods across all imported repos, for example: GLib.Error.toString
would be overridden (maybe in #10) and all errors would be overridden at once.
That said, do you think it's a good idea to cache repos, so that
require(lib, version)
always returns the same exact Object instead of creating new ones each time?
Yeah it's good to cache repos.
I rebased it on main. is this ready to merge now?
Thanks, I just added the code to throw a generic error like Error invoking constructor {name}
when a function invocation does not succeed but without an error.
Ready for re-review
By default, only the message
Error invoking method ${methodName}
is logged when invoking an error. This PR ~logs~ throws the GLib.Error correctly if an error happened while executing a function.~I'm creating this as a draft PR because I think the better approach is to throw the
GLib.Error
(hence interrupting control flow), but I'm still thinking about creating a GLib.Error~ done