Handle exceptions in sample

Small wrapper over the `lineprof` function to raise a `RuntimeError` with an error message indicating that the sampled code threw an uncaught exception that got all the way here.