<commit_before>import { Injectable } from '@angular/core';
import { Network } from '@ionic-native/network';
import { PreRequestPlugin } from '@mbamobi/http';
import { NoConnectionException } from './exception';

@Injectable()
export class NoConnectionPlugin implements PreRequestPlugin {

  constructor(private network: Network) {}

  getPriority(): number {
    return 0;
  }

  getName() {
    return 'no-connection-mobile';
  }

  preRequest() {
    if (this.network.type === 'none') {
      throw new NoConnectionException('Not Connection');
    }
  }
}<commit_msg>feat(no-connection): unknown network type as NoConnectionException<commit_after>import { Injectable } from '@angular/core';
import { Network } from '@ionic-native/network';
import { PreRequestPlugin } from '@mbamobi/http';
import { NoConnectionException } from './exception';

@Injectable()
export class NoConnectionPlugin implements PreRequestPlugin {

  constructor(private network: Network) {}

  getPriority(): number {
    return 0;
  }

  getName() {
    return 'no-connection-mobile';
  }

  preRequest() {
    if (['unknown', 'none'].indexOf(this.network.type) >= 0) {
      throw new NoConnectionException('Not Connection');
    }
  }
}
{'fraction_non_alphanumeric': 0.13591433278418452, 'fraction_numerical': 0.002471169686985173, 'mean_word_length': 4.3056768558951966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1054222', 'n_tokens_mistral': 352, 'n_tokens_neox': 337, 'n_words': 86}