Use less return_val_if_fail checks
In C, we often check preconditions in our functions using
g_return_if_fail()
or g_return_val_fail()
, which are macros that
expand to the condition they're checking for so the logs clearly show
what might be going wrong.
Vala also exposes these functions, but given that Vala compiles to a lot
of jibberish temp variables, the output is not quite vague. Try to use
the Vala equivalent requires
to do something similar (unfortunately,
we can't use this everywhere as it can only be used at the beginning of
a mehod).