Skip to content

Commit 4790708

Browse files
committed
Added missing reference for .NET 4.7.2
1 parent 60c7b57 commit 4790708

File tree

5 files changed

+63
-21
lines changed

5 files changed

+63
-21
lines changed

ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The context information will be attached as:
3131

3232
![](https://coderrio/images/features/custom-context.png)
3333

34-
[Read more...](https://coderrio/features/)
34+
[Read more...](https://coderr.io/documentation/getting-started/)
3535

3636

3737
# Automated handling

src/Coderr.Client.Demo/Program.cs

+50-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,70 @@
11
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using System.IO;
5+
using System.Net.NetworkInformation;
6+
using System.Runtime.InteropServices;
7+
using Coderr.Client;
8+
using Coderr.Client.Contracts;
9+
using Coderr.Client.Uploaders;
210

311
namespace Coderr.Client.Demo
412
{
13+
514
class Program
615
{
716
static void Main()
817
{
9-
var url = new Uri("http://localhost:60473/");
18+
//var url = new Uri("http://localhost:60473/");
19+
//Err.Configuration.Credentials(url,
20+
// "5a617e0773b94284bef33940e4bc8384",
21+
// "3fab63fb846c4dd289f67b0b3340fefc");
22+
23+
var url = new Uri("https://report.coderr.io/");
1024
Err.Configuration.Credentials(url,
11-
"1a68bc3e123c48a3887877561b0982e2",
12-
"bd73436e965c4f3bb0578f57c21fde69");
25+
"d0c16767d68943dabe94dc581c45557c",
26+
"88db0622561d4d1db389524e13901c22");
27+
28+
Err.Configuration.EnvironmentName = "Production";
1329

14-
Err.ReportLogicError("User should have been assigned.");
1530
try
1631
{
17-
throw new NotSupportedException("Not invented here");
32+
throw new InvalidOperationException("Hello");
1833
}
1934
catch (Exception ex)
2035
{
21-
Err.Report(ex, new { myData = "hello", ErrTags = "important" });
36+
//var report = Err.GenerateReport(ex, new { userId = 10, ErrTags = "important" });
37+
//Err.UploadReport(report);
38+
//Err.LeaveFeedback(report.ReportId, "[email protected]", "This is what I did: NOTHING!");
39+
40+
Err.Report(ex, new { userId = 10, ErrTags="console" });
2241
}
42+
43+
Err.ReportLogicError("User should have been assigned.", errorId: "MainN");
44+
45+
ThrowImportantError();
2346
Console.WriteLine("Hello World!");
2447
}
48+
49+
public static void ThrowImportantError()
50+
{
51+
try
52+
{
53+
throw new NotSupportedException("Not invented here");
54+
}
55+
catch (Exception ex)
56+
{
57+
Err.Report(ex, new
58+
{
59+
myData = "hello",
60+
ErrTags = "important",
61+
Adress =
62+
new
63+
{
64+
City = "Falun"
65+
}
66+
});
67+
}
68+
}
2569
}
2670
}

src/Coderr.Client/Coderr.Client.csproj

+5-10
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Coderr.Client.xml</DocumentationFile>
77
<RootNamespace>Coderr.Client</RootNamespace>
88

9-
<PackageReleaseNotes>Corrected the package icon.</PackageReleaseNotes>
10-
<Version>2.0.3</Version>
9+
<PackageReleaseNotes>Added missing reference for .NET 4.7.2</PackageReleaseNotes>
10+
<Version>2.0.4</Version>
1111
</PropertyGroup>
1212

1313
<PropertyGroup>
@@ -19,6 +19,7 @@
1919
<PackageTags>logger exceptions analysis .net-core NetStandard</PackageTags>
2020
<RepositoryUrl>https://github.com/coderrio/coderr.client</RepositoryUrl>
2121
<PackageIcon>NugetIcon.png</PackageIcon>
22+
<PackageIconUrl>https://coderr.io/images/nuget_icon.png</PackageIconUrl>
2223
<RepositoryType>git</RepositoryType>
2324
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
2425
<PackageProjectUrl>https://coderr.io</PackageProjectUrl>
@@ -29,17 +30,11 @@
2930
<Pack>true</Pack>
3031
<PackagePath>README.txt</PackagePath>
3132
</Content>
32-
<None Include="NugetIcon.png" Pack="true" PackagePath="/"/>
33-
</ItemGroup>
34-
35-
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
36-
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
37-
</ItemGroup>
38-
<ItemGroup Condition="$(TargetFramework) == 'net451'">
39-
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
33+
<None Include="NugetIcon.png" Pack="true" PackagePath="/" />
4034
</ItemGroup>
4135

4236
<ItemGroup>
4337
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
38+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
4439
</ItemGroup>
4540
</Project>

src/Coderr.Client/Config/CoderrConfiguration.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.Reflection;
45
using Coderr.Client.ContextCollections;
56
using Coderr.Client.Processor;
@@ -36,7 +37,8 @@ public CoderrConfiguration()
3637
{
3738
Uploaders = new UploadDispatcher(this);
3839
_userInteraction.AskUserForDetails = true;
39-
ThrowExceptions = true;
40+
ThrowExceptions = Debugger.IsAttached;
41+
QueueReports = !Debugger.IsAttached;
4042
MaxNumberOfPropertiesPerCollection = 100;
4143
}
4244

@@ -49,7 +51,8 @@ public CoderrConfiguration(IUploadDispatcher uploadDispatcher)
4951
{
5052
Uploaders = uploadDispatcher ?? throw new ArgumentNullException(nameof(uploadDispatcher));
5153
_userInteraction.AskUserForDetails = true;
52-
ThrowExceptions = true;
54+
ThrowExceptions = Debugger.IsAttached;
55+
QueueReports = !Debugger.IsAttached;
5356
MaxNumberOfPropertiesPerCollection = 100;
5457
}
5558

src/Coderr.Client/Err.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ public static void LeaveFeedback(string errorId, string emailAddress, string ste
178178
{
179179
Configuration.Uploaders.Upload(new FeedbackDTO
180180
{
181-
Description = emailAddress,
182-
EmailAddress = stepsToReproduce,
181+
Description = stepsToReproduce,
182+
EmailAddress = emailAddress,
183183
ReportId = errorId
184184
});
185185
}

0 commit comments

Comments
 (0)