/** * Cleanup anything this build may leave behind and inform the user */ private void HandleFailure(String FailureMessage) { try { if (WorkingCL != -1) { P4.RevertAll(WorkingCL); P4.DeleteChange(WorkingCL); } SendCompletionMessage(false, FailureMessage); } catch (P4Exception P4Ex) { LogError("Failed to clean up P4 changelist: " + P4Ex.Message); } catch (Exception SendMailEx) { LogError("Failed to notify that build succeeded: " + SendMailEx.Message); } }