handle parse exception for invalid primary rule