Use Try monad instead of WasThrown custom class to identify exceptions thrown in user code

- Aside from making the implementation slightly more clear, this greatly simplifies the generated code that is executed in order to garther the insights results