throw error if parsing not complete