An exception thrown in transient service constructor stops the flow and global fault handler is not called
pnesterov opened this issue · 1 comments
pnesterov commented
I've added a WCF service as transient service which has no endpoint defined. Like this:
protected override void ConfigureServices(IServiceCollection services)
{
services.AddTransient<IExceptionThrowingServiceAdapter, ExceptionThrowingServiceAdapter>();
}
This service throws an exception in constructor.
My activity looks like this:
public class SomeActivity : BackgroundActivity
{
public SomeActivity(IExceptionThrowingService service)
{
...
}
...
}
When flow tries to enter the activity, it immediately stops. No global fault handler is called and task, which was returned from Run() method has status "RanToCompletion".
The flow log file contains an exception stack trace.
akarpov89 commented
Thanks for pointing this out!
Fixed.
See notes at https://github.com/akarpov89/MicroFlow#fault-handling