private ProcessReturn CheckReturn(string command, ProcessReturn ret) { if (ret.ReturnValue != 0) { throw new Exception(command + ": " + ret.Output); } return ret; }
private ProcessReturn CheckReturn(string command, ProcessReturn ret, BackgroundWorker worker) { worker.ReportProgress(-1, command + ": " + ret.Output); if (ret.ReturnValue != 0) { throw new Exception(command + ": " + ret.Output); } return ret; }