Make sure exceptions are raised when done profiling.