Better error throwing