pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

ExecutionLock: ExecutionAsync Does Not Log Exceptions #343

Closed houseofcat closed 6 years ago

houseofcat commented 6 years ago

Demonstrated here in sync call vs. async call.

public void Execute<T>(T obj, Action<T> action, CancellationToken token = default(CancellationToken))
{
     ...
     try
     { action(obj); }
     catch (Exception e)
     { _logger.Error("Exception when performing exclusive execute", e); }
    ...
}

And


public async Task ExecuteAsync<T>(T obj, Func<T, Task> func, CancellationToken token = default(CancellationToken))
{
    ....
    try
    { await func(obj);  }
    catch (Exception)
    { }
    ...
}
houseofcat commented 6 years ago

This is in master, closing issue. Will go out in the next release (2.0.0 RC6+).