Easier error generation. Errors now contain queries