Document what GLib critical log messages are, and why they are not exceptions that you can catch
For people coming from the JS developer community, the critical logs produced in C libraries by precondition checks such as g_return_if_fail()
are unusual. At first it seems like they are exceptions that you ought to be able to catch.
(Some of them are actually turned into exceptions by GJS, if they are expressed correctly in the GIR XML! e.g., the this
-object must be an instance of the correct class; a non-nullable in parameter must not be null
; etc. But many checks are too complicated to have a GIR annotation.)
We should document what these are, why they are considered programmer errors, why you can't catch them, and what you should do about them.