<commit_before>//
//  NSNoNetworkError.swift
//  iAsync_network
//
//  Created by <NAME> on 18.08.14.
//  Copyright © 2014 EmbeddedSources. All rights reserved.
//

import Foundation

import iAsync_utils

final public class NSNoNetworkError : NSNetworkError {

    override class func isMineNSNetworkError(_ error: NSError) -> Bool {
        return error.isNetworkError || error.socketIsNoLongerUsable
    }

    override public var localizedDescription: String {

        return NSLocalizedString(
            "J_NETWORK_NO_INTERNET_ERROR",
            bundle : Bundle(for: type(of: self)),
            comment:"")
    }

    /*override public var logTarget: Int {
        return LogTarget.Console.rawValue
    }*/
}<commit_msg>move to swift3<commit_after>//
//  NSNoNetworkError.swift
//  iAsync_network
//
//  Created by <NAME> on 18.08.14.
//  Copyright © 2014 EmbeddedSources. All rights reserved.
//

import Foundation

import iAsync_utils

final public class NSNoNetworkError : NSNetworkError {

    override class func isMineNSNetworkError(_ error: NSError) -> Bool {
        return error.isNetworkError || error.socketIsNoLongerUsable
    }

    override public var localizedDescription: String {

        return NSLocalizedString(
            "J_NETWORK_NO_INTERNET_ERROR",
            bundle : Bundle(for: type(of: self)),
            comment:"")
    }
}

public extension LoggedObject where Self : NSNoNetworkError {

    var logTarget: LogTarget { return LogTarget.console }
}
{'fraction_non_alphanumeric': 0.08999328408327736, 'fraction_numerical': 0.014103425117528543, 'mean_word_length': 2.900523560209424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '129105', 'n_tokens_mistral': 463, 'n_tokens_neox': 425, 'n_words': 114}