mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-02 03:55:59 +00:00
v1.x
This commit is contained in:
17
smart-admin-h5/src/plugins/smart-sentry.js
Normal file
17
smart-admin-h5/src/plugins/smart-sentry.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as Sentry from '@sentry/browser';
|
||||
|
||||
const SmartSentry = {};
|
||||
|
||||
SmartSentry.install = function(Vue, options) {
|
||||
Vue.prototype.$smartSentry = {
|
||||
captureException: (error) => {
|
||||
console.error(error);
|
||||
if (error.config && error.data && error && error.headers && error.request && error.status) {
|
||||
return;
|
||||
}
|
||||
Sentry.captureException(error);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default SmartSentry;
|
||||
Reference in New Issue
Block a user