Beispiel #1
0
 public void OperateField()
 {
     try
     {
         while (instructions.Count > 0)
         {
             ExecuteInstruction((char)instructions.getNextInstruction());
         }
     }
     catch (NullReferenceException noFieldToOperate)
     {
         throw new Exception("There is no field to be operated" + noFieldToOperate.StackTrace.ToString());
     }
     catch (IndexOutOfRangeException)
     {
         throw new IndexOutOfRangeException("Woops, You have got out of bounds and cutted the rare plants, you're fired BTW");
     }
 }