mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-21 07:58:25 +00:00
Report to sentry only on production
This commit is contained in:
@ -67,6 +67,8 @@ import { MoveLayerDownActionComponent } from './shared/node-context-menu/actions
|
|||||||
import { MoveLayerUpActionComponent } from './shared/node-context-menu/actions/move-layer-up-action/move-layer-up-action.component';
|
import { MoveLayerUpActionComponent } from './shared/node-context-menu/actions/move-layer-up-action/move-layer-up-action.component';
|
||||||
import { ProjectMapShortcutsComponent } from './project-map/project-map-shortcuts/project-map-shortcuts.component';
|
import { ProjectMapShortcutsComponent } from './project-map/project-map-shortcuts/project-map-shortcuts.component';
|
||||||
|
|
||||||
|
import { environment } from "../environments/environment";
|
||||||
|
|
||||||
Raven
|
Raven
|
||||||
.config('https://b2b1cfd9b043491eb6b566fd8acee358@sentry.io/842726')
|
.config('https://b2b1cfd9b043491eb6b566fd8acee358@sentry.io/842726')
|
||||||
.install();
|
.install();
|
||||||
@ -74,7 +76,9 @@ Raven
|
|||||||
export class RavenErrorHandler implements ErrorHandler {
|
export class RavenErrorHandler implements ErrorHandler {
|
||||||
handleError(err:any) : void {
|
handleError(err:any) : void {
|
||||||
console.error(err.originalError || err);
|
console.error(err.originalError || err);
|
||||||
Raven.captureException(err.originalError || err);
|
if (environment.production) {
|
||||||
|
Raven.captureException(err.originalError || err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user