"Using try/catch is a good practice?" Not just this.
Not using try/catch is impossibly bad practice. The only acceptable alternative is not caring about errors and other exceptional conditions (yes, this is quite acceptable in some cases).
Now, try/catch can not be an issue of performance by definition. If you need exception handling, there are unavoidable, if you use any other way of error handling (I hate even mentioning the idea), you make performance much worse.
Nevertheless, I see that
try/catch pretty often present huge performance problem. Yes, contradictory paragraphs in action. What I say in the previous paragraph assumed that the code is written by non-idiots. In real life, however… well, you understand. :-)
Try/catch should be used quite rarely. Ideally — once on the top of the stack of each thread (to prevent termination) and also in the main event cycle of the UI. Throw should be uses every time exceptional situation happens (not always an error, some exceptional situations, as the name suggests; classical example: "nuclear reactor overheated"). We do not spare CPU time for really exceptional situations, right. Another case of try/catch — primary specialize processing of the situation; try/finally should be more typical; close file handles, dispose, etc.
Actually, structure exception handling saves a lot of performance. Programming should be more offensive and less defensive. Most checks are not needed.
See some of my recommendations in my past answers:
How do i make a loop that will stop when a scrollbar reaches the bottom[
^],
When i run an application an exception is caught how to handle this?[
^],
throw . .then ... rethrowing[
^],
Unhandled Exception : Access Violation[
^].
Only last answer was about C++, but most recommendations are applicable to many platforms/languages.
—SA