Mainly try-catch has use when the code (i.e. libraries) launch them because some "exceptional cases" so you're forced to catch and handle them.
In addition to this case the use of if-then or try-catch depends on your code and how do you handle things (errors, special cases, etc).
If it is a new project you can decide how to handle this, or if you're maintaining code of some one obviously you'll try to use it's way to code in order to keep the code style consistent.
If-else is, usually, used to handle logic into the code flow without wrap every 2 line of code.
Anyway it is up to you decide the style.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Mainly try-catch has use when the code (i.e. libraries) launch them because some "exceptional cases" so you're forced to catch and handle them.
In addition to this case the use of if-then or try-catch depends on your code and how do you handle things (errors, special cases, etc).
If it is a new project you can decide how to handle this, or if you're maintaining code of some one obviously you'll try to use it's way to code in order to keep the code style consistent.
If-else is, usually, used to handle logic into the code flow without wrap every 2 line of code.
Anyway it is up to you decide the style.