Skip to content

Commit

Permalink
Add logs to find errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chopin-fan committed Jul 20, 2024
1 parent 6d0347b commit 6e906c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/AElf.ContractDeployer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private static void Run(Options o)
saveAsPath = o.ContractDllPath + ".patched";
Console.WriteLine($"[CONTRACT-PATCHER] Saving as {saveAsPath}");
}

using var application = AbpApplicationFactory.Create<ContractDeployerModule>();
application.Initialize();
var contractPatcher = application.ServiceProvider.GetRequiredService<IContractPatcher>();
Expand All @@ -61,6 +61,10 @@ private static void Run(Options o)
// Print error in parsable format so that it can be shown in IDE
Console.WriteLine($"error: {finding}");
}
catch (Exception e)
{
Console.WriteLine("Audit exception: ",e);
}

File.WriteAllBytes(saveAsPath, patchedCode);
}
Expand Down

0 comments on commit 6e906c2

Please sign in to comment.