Skip to content

overrides/GLib: Guard Error.new_literal against invalid domains

Florian Müllner requested to merge fmuellner/gjs:g-error-new-literal into master

g_error_new_literal() only enforces the precondition that the domain must be greater than 0, but will crash later if it doesn't correspond to a valid GQuark.

We can check for that in an override and throw an error if it doesn't.

(If the GQuark is valid, it may or may not correspond to an error domain. We can't tell, but while a domain of GLib.quark_from_string('void') is weird, it doesn't do any harm)

#433

Merge request reports