OK, I see that you changed that. Hmm, the setup seems a bit convoluted, might be simpler to always return an error message, possibly NULL, as the return value. There might be other places to use something like that, so may be worth thinking of a general pattern to use.