Add Profiler equivalent of 'On Error Resume Next'

See the comment in src/profile.c for an explanation for what this is doing