If I just paste code into IPython and there is a traceback, it shows me where in the code the exception was raised. But if I use %paste (which is apparently more recommended), it does not do this.
I think just calling self.run_cell instead of going straight to exec should fix it.
I think that's a good idea - there are only a few places where store_history=True is really what should happen. And it's not at all dangerous to accidentally have store_history=False, whereas inappropriate store_history=True makes a huge mess.
Use run_cell for %paste, instead of plain exec.
Closes gh-865, but introduces test failures for %cpaste
See PR #878.