Query something and return the reason if nothing has been found
- by Daniel Hilgarth
Assume I have a Query - as in CQS that is supposed to return a single value.
Let's assume that the case that no value is found is not exceptional, so no exception will be thrown in this case. Instead, null is returned.
However, if no value has been found, I need to act according to the reason why no value has been found.
Assuming that the Query…