forked from Wavyzz/dolibarr
New Added client-side Sentry logging
Using Raven.js allows logging client-side javascript errors to the configured Sentry server.
This commit is contained in:
12
htdocs/includes/raven-js/example/file2.js
Normal file
12
htdocs/includes/raven-js/example/file2.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function multiply(a, b) {
|
||||
"use strict";
|
||||
return a * b;
|
||||
}
|
||||
function divide(a, b) {
|
||||
"use strict";
|
||||
try {
|
||||
return multiply(add(a, b), a, b) / c;
|
||||
} catch (e) {
|
||||
Raven.captureException(e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user