It is a goof question and I do not think I can give you an answer that will satisfy you.
And I also do not think anymoer that I am on right track with the subject of this
thread.
But I will give an example. I have a situation that looks like this in my code
That started with the situation that the normal flow just created the object and there was a couple of different special cases that I needed to handle differently so I created exception classes for them. Since I do not use the exceptions anywhere else I considered this a bad coding practice. And now that the different cases have yet again multiplied I have many Exception classes that I do not use anywhere else. I have considered of refactoring my code to something like this
I know that this looks like something from C but I still think that the latter is better. Of course I also could just make a single Exception type that contains the details of the exception reason. But since the exceptions are not actual errors (just normal control flow) I do not want to throw exceptions at all in this situation.
Or if you have something better I will happily hear you out