Changed raise Exception to parser.error