Skip to content

Commit d8794ec

Browse files
committed
Added support for ReportLogicError and modified namespaces.
1 parent fd29cae commit d8794ec

File tree

4 files changed

+26
-57
lines changed

4 files changed

+26
-57
lines changed

src/Coderr.Client.Demo/Program.cs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Data;
33
using System.IO;
44
using System.Net;
5+
using System.Runtime.Remoting.Messaging;
56

67
namespace Coderr.Client.Demo
78
{
@@ -28,16 +29,10 @@ private static void Main(string[] args)
2829
// "yourOwnSharedSecret");
2930

3031
var url = new Uri("http://localhost:50473/");
31-
Err.Configuration.Credentials(url,
32-
"ae0428b701054c5d9481024f81ad8b05",
32+
Err.Configuration.Credentials(url,
33+
"ae0428b701054c5d9481024f81ad8b05",
3334
"988cedd2bf4641d1aa228766450fab97");
3435

35-
var a = 10;
36-
37-
Err.ReportLogicError("This failed", new {id = 10}, "MixMax2");
38-
39-
40-
4136
try
4237
{
4338
//throw new InvalidDataException("Hello world");
@@ -51,7 +46,7 @@ private static void Main(string[] args)
5146
}
5247
catch (Exception e)
5348
{
54-
var webEx = (WebException) e.InnerException;
49+
var webEx = (WebException)e.InnerException;
5550
if (webEx != null)
5651
{
5752
var reader = new StreamReader(webEx.Response.GetResponseStream());
@@ -60,5 +55,18 @@ private static void Main(string[] args)
6055
}
6156
}
6257
}
58+
59+
public static void DemoLogicalErrors()
60+
{
61+
Err.ReportLogicError("User skipped step Starting", new { user = "Arne" }, "SkipStepStarting");
62+
Err.ReportLogicError("This failed", new { id = 10 }, "MixMax2");
63+
Err.ReportLogicError("Network dropped packets",
64+
new
65+
{
66+
destination = "chat.host.com",
67+
packet = new { FromNick = "jonas", ToNick = "arne", message = "Hello world" }
68+
});
69+
70+
}
6371
}
6472
}

src/Coderr.Client/Coderr.Client.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net45;net452;net40</TargetFrameworks>
3+
<TargetFrameworks>net45;net452;net40;net46</TargetFrameworks>
44
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Coderr.Client.xml</DocumentationFile>
55

6-
<PackageReleaseNotes>Added support for ReportLogicError.</PackageReleaseNotes>
6+
<PackageReleaseNotes>Added support for ReportLogicError and renamed namespaces, update to "Coderr.*".</PackageReleaseNotes>
77
<Version>1.1.0</Version>
88
</PropertyGroup>
99

src/Coderr.Client/Err.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ public static void Report(Exception exception, object contextData)
257257
/// Define your own unique identifier for this error. The message + the calling message are otherwise
258258
/// used to generate an hash identifier for this method
259259
/// </param>
260-
/// <param name="callerName">Name of invoking method</param>
261260
/// <remarks>
262261
/// <para>
263262
/// Logical errors are bugs where you expected a specific state in your application whole you received something

src/Coderr.Client/README.txt

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,12 @@
1-
codeRR client package
1+
Coderr client package
22
=====================
33

4-
Welcome to codeRR!
4+
This library is the client library of Coderr. It allows you to manually report exceptions to the Coderr server.
5+
If you would like to use automated reporting, install one of our automation nuget packages.
56

6-
This library is the client library of codeRR. It allows you to manually report exceptions to the codeRR server.
7-
If you would like to use automated reporting, install one of the other codeRR nuget packages.
7+
https://coderr.io/documentation/getting-started/
88

9-
This library doesn’t process the generated information.
10-
Information processing is done by the codeRR server which you will need to install.
11-
12-
For a server with full functionality, we recommend you to use our hosted service at https://coderrapp.com/live.
13-
But you can also use and install the open source server version from https://github.com/coderrapp/coderr.server.
14-
15-
For any questions that you might have, please use our forum at http://discuss.coderrapp.com. At the forum, we will try to answer questions as fast as we can and post answers to questions that have already been asked. Don't hesitate to use it!
16-
17-
Configuration
18-
=============
19-
20-
Start by configuring the connection to the codeRR server. The code below is typically added in
21-
your global.asax, Program.cs or Startup.cs. The configuration settings is found either in codeRR Live or
22-
in your installed codeRR server.
23-
24-
public class Program
25-
{
26-
public static void Main(string[] args)
27-
{
28-
29-
// codeRR configuration
30-
var uri = new Uri("https://report.coderrapp.com/");
31-
Err.Configuration.Credentials(uri,
32-
"yourAppKey",
33-
"yourSharedSecret");
34-
35-
// the usual stuff
36-
// [...]
37-
}
38-
}
39-
40-
Want automated exception reporting? Install one of the integration packages instead.
41-
They are listed here: https://github.com/coderrapp/coderr.client/
42-
43-
44-
Reporting exceptions
45-
====================
46-
47-
This is one of many examples:
9+
Simple reporting example:
4810

4911
public void SomeMethod(PostViewModel model)
5012
{
@@ -62,5 +24,5 @@ This is one of many examples:
6224
// some other code here...
6325
}
6426

65-
Again for questions, go to http://discuss.coderrapp.com
66-
Additional documentation can be found at https://coderrapp.com/documentation/client/
27+
For questions: https://discuss.coderr.io
28+
Homepage: https://coderr.io

0 commit comments

Comments
 (0)