tslint changes

This commit is contained in:
Jeremy Simpson
2019-08-30 01:52:40 -07:00
parent 7603879d35
commit 7f7efbb94b
446 changed files with 70650 additions and 70661 deletions
@@ -8,54 +8,54 @@ import { rollbarCheckIgnore, isIgnoredError } from '../../common/rollbar';
const host = typeof location === 'undefined' ? '' : location.host;
const rollbarConfig = {
environment: ROLLBAR_ENV,
accessToken: ROLLBAR_TOKEN,
ignoredMessages: ['disconnected'],
hostWhiteList: [host],
captureUncaught: true,
captureUnhandleRejections: true,
// checkIgnore,
enabled: true,
payload: {
environment: ROLLBAR_ENV,
version: version, // NOTE: workaround for compilation issue
client: {
javascript: {
source_map_enabled: true,
guess_uncaught_frames: true,
code_version: HASH,
},
},
},
environment: ROLLBAR_ENV,
accessToken: ROLLBAR_TOKEN,
ignoredMessages: ['disconnected'],
hostWhiteList: [host],
captureUncaught: true,
captureUnhandleRejections: true,
// checkIgnore,
enabled: true,
payload: {
environment: ROLLBAR_ENV,
version: version, // NOTE: workaround for compilation issue
client: {
javascript: {
source_map_enabled: true,
guess_uncaught_frames: true,
code_version: HASH,
},
},
},
};
export const RollbarService = new InjectionToken<Rollbar>('rollbar');
export function rollbarFactory() {
if (DEVELOPMENT) {
return undefined;
} else {
const rollbar = Rollbar.init(rollbarConfig);
rollbar.configure({ checkIgnore: rollbarCheckIgnore });
return rollbar;
}
if (DEVELOPMENT) {
return undefined;
} else {
const rollbar = Rollbar.init(rollbarConfig);
rollbar.configure({ checkIgnore: rollbarCheckIgnore });
return rollbar;
}
}
@Injectable()
export class RollbarErrorHandler extends ErrorHandler {
constructor(private injector: Injector) {
super();
}
handleError(error: any) {
super.handleError(error);
constructor(private injector: Injector) {
super();
}
handleError(error: any) {
super.handleError(error);
if (!DEVELOPMENT && rollbarConfig.accessToken) {
const rollbar = this.injector.get(RollbarService);
const err = error.originalError || error || {};
if (!DEVELOPMENT && rollbarConfig.accessToken) {
const rollbar = this.injector.get(RollbarService);
const err = error.originalError || error || {};
if (!isIgnoredError(err)) {
rollbar.error(err);
}
}
}
if (!isIgnoredError(err)) {
rollbar.error(err);
}
}
}
}