We can throw exception in catch statement block and change the exception type.try{ ...}catch (FormatException ex){ throw new XmlException ("Invalid DateTime", ex);}