Programming Tip for the day – Hiding Exceptions

Hello Programmers,


Hiding exceptions is a sin.  Don’t do it unless you want to be tagged as a bad developer.

If you don’t understand what I am talking about, here is the code snippet.

try catch
Try catch



int i = 10/0;


catch(Exception e)


//Do Nothing – Please don’t do this!!



Moral: Always throw the exceptions and log them.  It will get incredibly hard to spot the issue while debugging if you try to hide the exceptions.

Contact Form

By clicking 'Submit' you Agree to Guvi Terms & Conditions.

Our Learners Work at

Our Popular Course

Share this post

Author Bio


Our Live Classes

Learn Javascript, HTML, CSS, Java, Data Structure, MongoDB & more
Learn Python, Machine Learning, NLP, Tableau, PowerBI & more
Learn Selenium, Python, Java, Jenkins, Jmeter, API Testing & more
Learn Networking, Security Testing, IAM, Access Management & more

Hey wait, Don’t miss New Updates from GUVI!

Get Your Course Now

Related Articles