Remove try catches choking all exceptions (#5206)
* remove some try catches choking all exceptions * rename ExceptionExtension to ReportAsWarning, show full stack instead of just message * dotnet-migrate try catch clean-up * fix migration test failures
This commit is contained in:
parent
a442449c55
commit
5fea7c3ae6
18 changed files with 212 additions and 71 deletions
|
@ -0,0 +1,22 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<AssemblyName>dotnet-throwingtool</AssemblyName>
|
||||
<PackageId>$(AssemblyName)</PackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
|
||||
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
|
||||
</BuiltProjectOutputGroupOutput>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.3</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace AppThrowing
|
||||
{
|
||||
class MyException : Exception
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
throw new MyException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.3</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-throwingtool">
|
||||
<Version>1.0.0</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="test-packages" value="../pkgs" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,8 @@
|
|||
using System;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue