Simpify error generation