Different exception handling between Task.Run and Task.Factory.StartNew
问题 I encountered an issue when I was using Task.Factory.StartNew and tried to capture an exception that is thrown. In my application I have a long running task that I want to encapsulate in a Task.Factory.StartNew(.., TaskCreationOptions.LongRunning); However, the exception isn't caught when I'm using Task.Factory.StartNew . It is however working as I expect when I use Task.Run , which I thought was just a wrapper on Task.Factory.StartNew (according to for instance this MSDN article). A working