public async Task HandleAsync(T message) { try { await _decorated.HandleAsync(message).ConfigureAwait(false); } catch (Exception e) { await _debugMessageManager.ShowAsync($"[ERROR]: {e.ToString().Substring(0,500)}").ConfigureAwait(false); throw; } }
public async Task HandleAsync(T message) { var sw = new Stopwatch(); sw.Start(); await _decorated.HandleAsync(message).ConfigureAwait(false); sw.Stop(); await _debugMessageManager.ShowAsync($"{message.GetType().Name}:ActionDuration: {FormatElapsedTime(sw)}") .ConfigureAwait(false); }