示例#1
0
 public InstrumentError(string errorDescription, InstrumentError innerException=null)
     : base(errorDescription,innerException)
 {
     this.ErrorDescription = errorDescription;
     if (innerException != null)
     {
         this.InstrumentInError = innerException.InstrumentInError;
         this.CanRecover = innerException.CanRecover;
         this.TimeThrown = innerException.TimeThrown;
     }
     else
     {
         this.CanRecover = false;
         this.TimeThrown = DateTime.Now;
     }
 }
示例#2
0
文件: Twister.cs 项目: RobAmos/osla
 public override bool AttemptRecovery(InstrumentError Error)
 {
     //ditch the old stuff
     StatusOK = false;
     try
     {
         CloseAndFreeUpResources();
         Initialize();
         initializeTwisterPositions();
         return true;
     }
     catch { return false; }
 }
示例#3
0
 public override bool AttemptRecovery(InstrumentError Error)
 {
     return AttemptRecovery();
 }
示例#4
0
 /// <summary>
 /// This is an optional method that allows for some instruments to try
 /// and self-diagnose and correct a mistake based on the error produced.
 /// 
 /// This method should attempt to resolve the issue, if it cannot, then it should return a value indicating as much
 /// </summary>
 /// <param name="Error"></param>
 /// <returns></returns>
 public abstract bool AttemptRecovery(InstrumentError Error);
示例#5
0
 public override bool AttemptRecovery(InstrumentError Error)
 {
     StatusOK = false;
     try
     {
         CloseAndFreeUpResources();
         Initialize();
         return true;
     }
     catch { return false; }
 }
示例#6
0
文件: Incubator.cs 项目: RobAmos/osla
 public override bool AttemptRecovery(InstrumentError Error)
 {
     //This method will attempt to recover from an error of somesort
     if (Error.CanRecover)
     {
         return false;
     }
     else { return false; }//could not recover from the error in question
 }