Only one spouse can claim the principal residence exemption for a given year on a given property in most cases, so if either of you owned another property during the marriage, the taxable portion is calculated on 50 percent of any gain outside the exemption, and that math is worth reviewing with an accountant before the sale closes.
The sale proceeds themselves are typically held in trust by the conveyancing lawyer until a separation agreement or court order directs how they are divided, and that division is a family property question, not a tax event on its own.
This is general information, not tax advice, and every situation is different enough that a tax professional should confirm your specific numbers. Get your hand-reviewed valuation from Joel Dyck.