Пример #1
0
 private void OutPutandFlushLog()
 {
     try
     {
         pPPG.RecallPrbsLength();
         AnalysisOutputParameters(outputParameters);
     }
     catch (InnoExCeption ex)//from driver
     {
         //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace);
         exceptionList.Add(ex);
     }
     catch (Exception error)//from itself
     {
         //one way: deal this exception itself
         InnoExCeption ex = new InnoExCeption(ExceptionDictionary.Code._0x02FFF, error.StackTrace);
         //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace);
         exceptionList.Add(ex);
         //the other way is: should throw exception, rather than the above three code. see below:
         //throw new InnoExCeption(ExceptionDictionary.Code._0x02FFF, error.StackTrace);
     }
 }
Пример #2
0
        protected override bool StartTest()
        {
            logoStr = "";

            if (!AnalysisInputParameters(inputParameters))
            {
                return(false);
            }

            if (!LoadPNSpec())
            {
                return(false);
            }

            if (PrepareEnvironment(selectedEquipList) == false)
            {
                OutPutandFlushLog();
                return(false);
            }

            if (supply != null)
            {
                //CloseandOpenAPC(Convert.ToByte(APCMODE.IBAISandIMODOFF));

                bool result = Test();
                ppg.RecallPrbsLength();

                OutPutandFlushLog();

                return(result);
            }
            else
            {
                Log.SaveLogToTxt("Equipments are not enough!");
                return(false);
            }
        }