Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have noticed one thing in all core files: all DB related operations are not in try-catch block.
So please suggest me whether it's good practice to put SELECT, UPDATE, INSERT query in try catch block.
It's good practice to put any code that could potentially throw an exception in a try...catch (not just in Drupal-related code, and not just in PHP).
So yes, it's good practice to put your database queries in a try...catch.
Required, but never shown