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; } }
public override bool AttemptRecovery(InstrumentError Error) { //ditch the old stuff StatusOK = false; try { CloseAndFreeUpResources(); Initialize(); initializeTwisterPositions(); return true; } catch { return false; } }
public override bool AttemptRecovery(InstrumentError Error) { return AttemptRecovery(); }
/// <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);
public override bool AttemptRecovery(InstrumentError Error) { StatusOK = false; try { CloseAndFreeUpResources(); Initialize(); return true; } catch { return false; } }
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 }