I'm trying to think of a function which is measurable but not continuous a.e. My first thought was the Dirichlet function $\chi_{\Bbb Q}$ on $[0,1]$. That is to say
$$ \chi_{\Bbb Q}(x) = \begin{cases} 1 & \text{ if } x\in \Bbb Q \\ 0 & \text{ if } x\not\in\Bbb Q \end{cases}$$
and we restrict this function to $[0,1]$.
But then it seems to me that this function restricted to the irrationals is continuous because the restriction is constant. And $m([0,1]\smallsetminus ([0,1]\smallsetminus \Bbb Q))=0$ so the irrationals do seem to satisfy the the conditions which make $\chi_{\Bbb Q}$ continuous a.e.
Yet this post seems to indicate that $\chi_{\Bbb Q}$ cannot be continuous on any such restriction: https://math.stackexchange.com/a/67056/74378
I'm certainly misunderstanding something but I'm not sure what.
[Edit: Oh I think I see the discrepancy, which is that the person was asking for a function discontinuous a.e. So although $\chi_{\Bbb Q}$ is discontinuous a.e. because it's actually discontinuous everywhere, I guess it could also be continuous a.e. too?]