Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
 public override bool AttemptRecovery(InstrumentError Error)
 {
     //ditch the old stuff
     StatusOK = false;
     try
     {
         CloseAndFreeUpResources();
         Initialize();
         initializeTwisterPositions();
         return true;
     }
     catch { return false; }
 }
Exemplo n.º 3
0
 public override bool AttemptRecovery(InstrumentError Error)
 {
     return AttemptRecovery();
 }
Exemplo n.º 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);
Exemplo n.º 5
0
 public override bool AttemptRecovery(InstrumentError Error)
 {
     StatusOK = false;
     try
     {
         CloseAndFreeUpResources();
         Initialize();
         return true;
     }
     catch { return false; }
 }
Exemplo n.º 6
0
 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
 }