Skip to content

Commit

Permalink
[Enhancement] Add more error message from caught exception
Browse files Browse the repository at this point in the history
  • Loading branch information
arnobpl committed Feb 24, 2024
1 parent c66f7fa commit d924a09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SymlinkCreator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.2.5")]
[assembly: AssemblyFileVersion("1.2.5")]
[assembly: AssemblyVersion("1.2.6")]
[assembly: AssemblyFileVersion("1.2.6")]
15 changes: 14 additions & 1 deletion SymlinkCreator/core/ScriptExecutor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System;
using System.Diagnostics;
using System.IO;

namespace SymlinkCreator.core
Expand Down Expand Up @@ -45,6 +46,18 @@ public void ExecuteAsAdmin()
CreateWrapperScript(wrapperScriptFileName, stderrFileName);
ExecuteWrapperScript(wrapperScriptFileName, stderrFileName);
}
catch (Exception ex)
{
if (StandardError.Length > 0)
{
StandardError += "\n";
}
StandardError += ex.ToString();
if (ExitCode == 0)
{
ExitCode = -1;
}
}
finally
{
File.Delete(wrapperScriptFileName);
Expand Down

0 comments on commit d924a09

Please sign in to comment.