make error throwing more concise.