You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,9 +67,10 @@ errorHandler.start({
67
67
key:'<my-api-key>',
68
68
projectId:'<my-project-id>',
69
69
service:'<my-service>', // (optional)
70
-
version:'<my-service-version>'// (optional)
70
+
version:'<my-service-version>',// (optional)
71
71
// reportUncaughtExceptions: false // (optional) Set to false to stop reporting unhandled exceptions.
72
72
// disabled: true // (optional) Set to true to not report errors when calling report(), this can be used when developping locally.
73
+
// context: {user: 'user1'} // (optional) You can set the user later using setUser()
73
74
});
74
75
</script>
75
76
```
@@ -80,6 +81,8 @@ Unhandled exception will now automatically be reported to Stackdriver Error Repo
80
81
81
82
You can also change your application code to report errors: `try { ... } catch(e) { errorHandler.report(e); }` or simply `errorHandler.report('Something broke!');`.
82
83
84
+
You can set a user identifier at any time using `errorHandler.setUser('userId')`.
85
+
83
86
### Source maps
84
87
85
88
Only publicly available JavaScript source maps are supported.
0 commit comments