samedi 28 octobre 2017

difference between if throws and try

I have been using Team Tree house along with other methods to learn Java. Well in one of the videos we made a IF statement that used a throw exception. Nothing to crazy. The thing is when I create on it still throws the crazy long message with it. Just to clarify not talking about using a try catch here just using a if to throw a exception. a perfect example is if getting input and want to check if the input is blank or not. if its blank throw a exception to say its blank. Well the message works, I just get the long message with it. So how do I only get my message?

Aucun commentaire:

Enregistrer un commentaire