![]() | Error Recovery and Handling |
Error Recovery and Handling
In Hamilton STAR instrument, error recovery is very important. We can change the default error recovery for given error by add options parameter in the instrument function. For the error like TADM error (clot or leakage), you want to catch these error by your code and make your error handling, just set Cancel for recovery and use "try and catch" block to catch STARException. Within the STARException, you can get detailed error information.
ErrorRecoveryOptions options = new ErrorRecoveryOptions(); options.Add(MainErrorEnum.NoTipError, new ErrorRecoveryOption() { Recovery = RecoveryAction.Cancel }); options.Add(MainErrorEnum.NotExecutedError, new ErrorRecoveryOption() { Recovery = RecoveryAction.Cancel }); try { ML_STAR.Channel.PickupTip(cnts, options); } catch (STARException e) { foreach (ModuleError err in e.ModuleErrors) { Console.WriteLine(err.Module + " " + err.MainError + ":" + err.SlaveError + " " + err.LabwareId + ", " + err.PositionId); } }