<commit_before>import { ErrorHandler, Injectable, Inject } from '@angular/core';
import { Sentry } from '../';
import { SentryService, SentryModule } from './app.module';

@Injectable()
export class SentryErrorHandler extends ErrorHandler {
  constructor(@Inject(SentryService) private config) {
    super();
    if (config && config.dsn) {
      Sentry.init(config.dsn);
    } else {
      throw '[SentryAngular]: You need to provide your dsn on the forRoot method';
    }
  }

  handleError(err): void {
    try {
      Sentry.captureException(err, null);
    } catch (e) {
      console.log('[Sentry - SentryErrorHandler]', e);
    }
    throw err;
  }
}<commit_msg>make clear the log is from this plugin<commit_after>import { ErrorHandler, Injectable, Inject } from '@angular/core';
import { Sentry } from '../';
import { SentryService, SentryModule } from './app.module';

@Injectable()
export class SentryErrorHandler extends ErrorHandler {
  constructor(@Inject(SentryService) private config) {
    super();
    if (config && config.dsn) {
      Sentry.init(config.dsn);
    } else {
      throw '[SentryAngular]: You need to provide your dsn on the forRoot method';
    }
  }

  handleError(err): void {
    try {
      Sentry.captureException(err, null);
    } catch (e) {
      console.log('[NativeScript-Sentry - SentryErrorHandler]', e);
    }
    throw err;
  }
}
{'fraction_non_alphanumeric': 0.13299418604651161, 'fraction_numerical': 0.0, 'mean_word_length': 3.3438485804416405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7031367', 'n_tokens_mistral': 429, 'n_tokens_neox': 429, 'n_words': 113}