Beispiel #1
0
        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.");
        }
Beispiel #2
0
        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.")));
        }
Beispiel #3
0
        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.");
        }