Add error handling to devmode profiler.