Exceptions are a way to handle possible errors and the syntax is
try
{
// put whatever you want to happen. eg: A user has to enter some numbers in a text field and you only want numbers.
}
catch(Exception e)
{
//put an error message or whatever you want. For instance, if a user does not enter a message or enter some characters, display a message saying that he has to enter something in a text field or that he can only put numbers!!
}
I hope it will help you!!
Ousmane