Ejemplo n.º 1
0
 public override bool Execute()
 {
     try
     {
         Setup();
         ExecuteTask();
     }
     catch (Exception ex)
     {
         if (HubIgnoreFailure)
         {
             Log.LogMessage(MessageImportance.High, "Error executing Build BOM task on project {0}, cause: {1}", HubProjectName, ex);
             return(true);
         }
         else
         {
             Log.LogError("Error executing Build BOM task on project {0}, cause: {1}", HubProjectName, ex);
             return(false);
         }
     }
     finally
     {
         RestConnection.Dispose();
     }
     return(true);
 }
 public virtual bool Execute()
 {
     try
     {
         Validate();
         Setup();
         ExecuteTask();
     }
     catch (Exception ex)
     {
         if (HubIgnoreFailure)
         {
             Console.WriteLine("Error executing Build BOM task on project {0}, cause: {1}", HubProjectName, ex);
             return(true);
         }
         else
         {
             throw ex;
         }
     }
     finally
     {
         if (RestConnection != null)
         {
             RestConnection.Dispose();
         }
     }
     return(true);
 }