Browse Source

Ignore `HostAbortedException` in `app` and `module` template.

pull/14935/head
maliming 3 years ago
parent
commit
06b47e7e98
  1. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/Program.cs
  2. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/Program.cs
  3. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/Program.cs
  4. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs
  5. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/Program.cs
  6. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/Program.cs
  7. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/Program.cs
  8. 5
      templates/console/src/MyCompanyName.MyProjectName/Program.cs
  9. 5
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Program.cs
  10. 5
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Program.cs
  11. 5
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs
  12. 5
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/Program.cs
  13. 5
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Program.cs

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "MyCompanyName.MyProjectName.AuthServer terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/console/src/MyCompanyName.MyProjectName/Program.cs

@ -49,6 +49,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs

@ -40,6 +40,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/Program.cs

@ -43,6 +43,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

5
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Program.cs

@ -43,6 +43,11 @@ public class Program
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}

Loading…
Cancel
Save