Skip to content

Commit 16d0629

Browse files
committed
Merge pull request #26 from CaioProiete/fix-crashing-unhandled-exceptions
Fix ExcelDnaPack crashing due to unhandled exceptions | fixes #25
2 parents 273a22a + 7b1155e commit 16d0629

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

Source/ExcelDnaPack/PackProgram.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,22 @@ 2. in the same directory as the ExcelDnaPack.exe file.
3838
found next to FirstAddin.dna.
3939
Other assemblies are packed if marked with Pack=""true"" in the .dna file.
4040
";
41-
42-
static void Main(string[] args)
41+
42+
static int Main(string[] args)
43+
{
44+
try
45+
{
46+
Pack(args);
47+
return Environment.ExitCode;
48+
}
49+
catch (Exception ex)
50+
{
51+
Console.WriteLine(ex.ToString());
52+
return 1;
53+
}
54+
}
55+
56+
static void Pack(string[] args)
4357
{
4458
// string testLib = @"C:\Work\ExcelDna\Version\ExcelDna-0.23\Source\ExcelDnaPack\bin\Debug\exceldna.xll";
4559
// ResourceHelper.ResourceLister rl = new ResourceHelper.ResourceLister(testLib);

0 commit comments

Comments
 (0)