Skip to content

Commit

Permalink
Better exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dsplaisted committed Sep 7, 2018
1 parent cb11d71 commit 708ee96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StrongNamer/AddStrongName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongN
}
catch (Exception ex)
{
Log.LogMessage(MessageImportance.High, $"Assembly file '{assemblyItem.ItemSpec}' failed to load. Skipping. {ex.Message}");
Log.LogMessage(MessageImportance.High, $"Assembly file '{assemblyItem.ItemSpec}' failed to load. Skipping. {ex}");
throw;
}
}
Expand Down Expand Up @@ -191,12 +191,12 @@ ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongN
{
assembly.Write(assemblyOutputPath, new WriterParameters()
{

StrongNameKeyPair = key
});
}
catch (Exception ex)
{
Log.LogMessage(MessageImportance.High, $"Failed to write signed assembly to '{assemblyOutputPath}'. {ex}");
File.Delete(assemblyOutputPath);
}

Expand Down

0 comments on commit 708ee96

Please sign in to comment.