In version 10 or later, we can use [`EvaluationData`](http://reference.wolfram.com/mathematica/ref/EvaluationData.html). EvaluationData[1/0; 0^0] ![Mathematica graphics](https://i.sstatic.net/gFNtm.png) Behind the scenes, this uses handlers, like in my first answer.