This repository was archived by the owner on Aug 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,26 @@ ravenClient.CaptureMessage("Hello World!");
3232
3333Additional Data
3434---------------
35- The capture methods allow you to provide additional data to be sent with your request. ` CaptureException ` supports both the
36- ` tags ` and ` extra ` properties, and ` CaptureMessage ` additionally supports the ` level ` property.
35+ You can add additional data to the [ ` Exception.Data ` ] ( https://msdn.microsoft.com/en-us/library/system.exception.data.aspx )
36+ property on exceptions thrown about in your solution:
37+
38+ ``` csharp
39+ try
40+ {
41+ // ...
42+ }
43+ catch (Exception exception )
44+ {
45+ exception .Data .Add (" SomeKey" , " SomeValue" );
46+ throw ;
47+ }
48+ ```
49+
50+ The data ` SomeKey ` and ` SomeValue ` will be captured and presented in the ` extra ` property on Sentry.
51+
52+ Additionally, the capture methods allow you to provide additional data to be sent with your request.
53+ ` CaptureException ` supports both the ` tags ` and ` extra ` properties, and ` CaptureMessage ` additionally
54+ supports the ` level ` property.
3755
3856The full argument specs are:
3957
@@ -123,7 +141,7 @@ the property `ErrorOnCapture`:
123141
124142```csharp
125143ravenClient .ErrorOnCapture = exception => {
126- // custom code here
144+ // custom code here
127145 };
128146````
129147
Original file line number Diff line number Diff line change @@ -61,6 +61,22 @@ You can capture a message without being bound by an exception:
6161Additional Data
6262---------------
6363
64+ You can add additional data to the `Exception.Data <https://msdn.microsoft.com/en-us/library/system.exception.data.aspx> `
65+ property on exceptions thrown about in your solution:
66+
67+ .. sourcecode :: csharp
68+
69+ try
70+ {
71+ // ...
72+ }
73+ catch (Exception exception)
74+ {
75+ exception.Data.Add("SomeKey", "SomeValue");
76+ throw;
77+ }
78+
79+
6480The capture methods allow you to provide additional data to be sent with
6581your request. ``CaptureException `` supports both the ``tags `` and extra
6682``properties ``, and ``CaptureMessage `` additionally supports the
You can’t perform that action at this time.
0 commit comments