Exemple #1
0
 private void inflateWheelsAirPressureToMaxMenu()
 {
     try
     {
         string registrationNumber = getExistingRegistrationNumberFromUser();
         m_Garage.InflateWheelsAirPressure(registrationNumber);
         Console.WriteLine("Inflate air pressure was operated successfully.");
     }
     catch (ArgumentException i_ArgumentException)
     {
         if (i_ArgumentException.Message == "Vehicle_Not_Exist")
         {
             Console.WriteLine("There is no vehicle in the garage with the entered registaration number.");
         }
     }
     catch (Exception i_Ex)
     {
         if (i_Ex.Message == "Invalid data input")
         {
             Console.WriteLine("Error: {0}.{1}", i_Ex.Message, Environment.NewLine);
         }
         else
         {
             Console.WriteLine("Error: Unknown.{0}", Environment.NewLine);
         }
     }
 }