Simplify error generation