I decided to downvote your question instead of casting a close vote, because of the relatively new consensus about narrowed-down questions, to which I don't agree.
So I let your question go, with a downvote. After 2 days there still hadn't been a single close vote on it, so seeing that it had been edited, I retracted my downvote and decided to play the game and review your code - because that's what CR answers are supposed to be: peer reviews.
This is the accepted answer (7 upvotes, 0 down):
Using exception handling for flow control is discouraged by
Microsoft.
And a round table on the topic is
available.
That being said, C# supports doing so, and I suppose it depends on the
condition encountered whether an exception is the most appropriate
response.
Nowhere near a peer review. It does answer the OP's question though - about whether or not it's ok to throw an exception just to send the execution path into a catch
block, i.e. to control execution flow.
The problem is that, in my opinion, this isn't what this site is about.
From our Help Center (emphasis mine):
Simply ask yourself the following questions. To be on-topic the
answer must be yes to all questions:
- Does my question contain code? (Please include the code in the question, not a link to it)
- Did I write that code?
- Is it actual code from a project rather than pseudo-code or example code?
- Do I want the code to be good code, (i.e. not code-golfing, obfuscation, or similar)
- To the best of my knowledge, does the code work?
- Do I want feedback about any or all facets of the code?
If the answer to any of these 6 points is no, then CR is not the right place to ask. In my opinion the narrowed-down nature of your question went against the last one; answerers simply cannot address any facet of your code, other than what you've narrowed it down to.
As a result, I deem your question to be more of a high-level design question that's best asked on Programmers.StackExchange, since all you're looking for is a "no, it's not best-practice because xyz" rather than an actual peer review, where answerers can help you come up with cleaner alternatives and point out other flaws in your code, flaws that can affect readability, maintainability, performance, security, etc.
Until a couple of weeks ago, I would have simply cast a close vote and pointed to Programmers.SE in a comment. In spite of recent meta-discussions and seeing that no one else was casting a close vote, I chose to downvote instead.
Your comment on my answer:
This answer demonstrates exactly why I tried to keep my code generic: I didn't want to list out every single exception that I actually make in my code; I didn't want to list the actual method names; I didn't want to list the method declaration; I didn't want syntax suggestions. I had a single question about whether throwing exceptions for flow control was okay, which was promptly answered by B2K. I would be happy to debate this on meta. – grovesNL 41 mins ago
To me, demonstrates exactly why I should have stuck to my original idea and cast a close vote instead. If you're looking for a "yes/no" answer, CR definitely isn't the right place to ask. Here's a Community Ad that was recently submitted, that does a very good job at explaining what we do:
