Fix vala warnings due to unhandled exceptions in tests

This is rather bureaucratic as we don't mind uncaught exceptions in tests. But
it makes the make output hard to read and find real warnings.