public static void main(
String args[]) throws InvalidRecord
{
String input=JOptionPane.showInputDialog("\n\tEnter the date of the registration..");
int date=0;
try{
date=Integer.parseInt(input);
}catch(NumberFormatException nfe)
{
throw new InvalidRecord("Date must be numeric");
}
VehicleRecord vr=new VehicleRecord("bnh",date,"ford","escord","colour");
}
for example here, the exception is thrown is user enter non numeric data, and then program stops working, how can i continue coding? for exmaple how can i make user to enter the data again?