src/T4Toolbox.VisualStudio/OutputFileManager.cs
/// <summary>
/// Executes the logic necessary to update output files.
/// </summary>
Executes the logic necessary to update output files.
Executes the logic necessary to update output files .
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "How else do we report an error from a background task?")]
        public void DoWork()
        {
            try
            {
                this.DeleteOldOutputs();
                List<OutputFile> outputsToSave = this.GetOutputFilesToSave().ToList();
                this.CheckoutFiles(outputsToSave.Select(output => this.GetFullPath(output.Path)).ToArray());
                this.SaveOutputFiles(outputsToSave);
                this.ConfigureOutputFiles();
                this.RecordLastOutputs();
            }
            catch (TransformationException e)
            {
                this.LogError(e.Message); 
            }
            catch (Exception e)
            {
                this.LogError(e.ToString());
            }
        }
[ SuppressMessage ( " " , " " , Justification = " " ) ] public void DoWork ( ) { try { this . DeleteOldOutputs ( ) ; List < OutputFile > outputsToSave = this . GetOutputFilesToSave ( ) . ToList ( ) ; this . CheckoutFiles ( outputsToSave . Select ( output => this . GetFullPath ( output . Path ) ) . ToArray ( ) ) ; this . SaveOutputFiles ( outputsToSave ) ; this . ConfigureOutputFiles ( ) ; this . RecordLastOutputs ( ) ; } catch ( TransformationException e ) { this . LogError ( e . Message ) ; } catch ( Exception e ) { this . LogError ( e . ToString ( ) ) ; } }
Executes the logic necessary to update output files.
Executes the logic necessary to update output files .
// Expected error condition. Log message only. // Unexpected error. Log the whole thing, including its callstack.