public string Handle(QuerySomethingWithException query) { base.Handle <QuerySomethingWithException, string>(query); TestOutputHelper.WriteLine($"Query result: {query.Data}."); throw new TestQueryHandlerException("This is a triggered post-processing exception."); }
public Task <string> HandleAsync(QuerySomethingWithException query, CancellationToken cancellationToken = default(CancellationToken)) { base.HandleAsync <QuerySomethingWithException, string>(query); TestOutputHelper.WriteLine($"Query result: {query.Data}."); return(Task.FromException <string>(new TestQueryHandlerException("This is a triggered post-processing exception."))); }
public string QuerySomethingWithException(QuerySomethingWithException query) { base.Handle <QuerySomethingWithException, string>(query); TestOutputHelper.WriteLine($"Query result: {query.Data}."); TestOutputHelper.WriteLine($"Instance #{_instanceCounter}."); throw new Exception("This is a triggered post-processing exception."); }