1
1
# JavaScript library for Coderr
2
2
3
- This library is alpha . Feel free to try it, and please give us feedback.
3
+ This library is currently avilable as a release candidate . Feel free to try it, and please give us feedback.
4
4
5
- ## Example
5
+ https://coderr.io
6
+
7
+ ## Examples
8
+
9
+ The following examples are just demonstrating basic usage:
10
+
11
+ ### Using plain browser scripts
6
12
7
13
``` html
8
14
<html >
9
15
<head >
10
16
<script src =" coderr.browser.js" ></script >
11
17
<script >
12
18
// Setup
13
- var config = new coderr.Configuration (" http ://localhost:50473/ " , " f7aeacfdbe5447cdada6aa9ee21d24fb" );
19
+ var config = new coderr.Configuration (" https ://report.coderr.io " , " f7aeacfdbe5447cdada6aa9ee21d24fb" );
14
20
var reporter = new coderr.Coderr (config);
15
21
16
22
// report all unhandled errors
@@ -21,7 +27,7 @@ This library is alpha. Feel free to try it, and please give us feedback.
21
27
// This is how manual reporting is done.
22
28
//
23
29
// In this case not really nessacary since
24
- // "catchDomErrors" would have reprted it.
30
+ // "catchDomErrors" would have reported it.
25
31
try {
26
32
var a = 10 / 0 ;
27
33
}
@@ -33,10 +39,36 @@ This library is alpha. Feel free to try it, and please give us feedback.
33
39
</html >
34
40
````
35
41
36
- ## Example from UI
42
+ **From the Coderr Server UI**
37
43
38
44

39
45
40
46
Example showing the "userAgent" context collection.
41
47
42
- Coderr automatically includes information about the window, document, cookies, navigator and screen.
48
+ For browsers, Coderr automatically includes information about the window, document, cookies, navigator and screen.
49
+
50
+ ## Using TypeScript
51
+
52
+ ```typescript
53
+ import { CoderrClient, Configuration } from "coderr.client";
54
+ import { catchVueErrors } from "./Coderr.Vue"
55
+
56
+ var config = new Configuration("https://report.coderr.io/", "8ffd506b153f4ca690daaf6abd5fdcdf");
57
+ config.environmentName = 'production';
58
+ config.applicationVersion = 'v1.0';
59
+
60
+ var client = new CoderrClient(config);
61
+ client.catchDomErrors();
62
+ catchVueErrors(client);
63
+ ```
64
+
65
+ ** Result**
66
+
67
+ ![ ] ( docs/vue.png )
68
+
69
+ For VueJs, Coderr collections information about the failing component, the HTML for the rendered component view, selected routes and more.
70
+
71
+
72
+ # Questions
73
+
74
+ https://discuss.coderr.io
0 commit comments