When we ran some tools for performance for code review, it shows that exception should be specific wherever we declare..In some code there may be thousands of methods that does not mention thowing specific exceptions...
In best practices of using exceptions it has been said that when we declare a method capable of throwing an exception we need to mention more specific exception...If there is no performance impact, why it has been recommended in best practices ?
> If there is no performance
> impact, why it has been recommended in best practices
> ?
Not everything revolves around performance, especially when it comes to best practices. Just looking up "best practices" on wikipedia should get you started with answering this question.