<commit_before><commit_msg>custom exception<commit_after>package com.joker.fourfun.net;

/**
 * Created by joker on 2016/11/28.
 */

public class ApiException extends RuntimeException {
    public static final int MESSAGE_NOT_FOUND = 100;

    public ApiException(int resultCode) {
        this(getApiExceptionMessage(resultCode));
    }

    public ApiException(String detailMessage) {
        super(detailMessage);
    }

    private static String getApiExceptionMessage(int code) {
        String message = "";
        switch (code) {
            case MESSAGE_NOT_FOUND:
                message = "服务器数据错误";
                break;
            default:
                message = "未知错误";

        }
        return message;
    }
}
{'fraction_non_alphanumeric': 0.08618331053351573, 'fraction_numerical': 0.015047879616963064, 'mean_word_length': 2.210526315789474, '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': '3229842', 'n_tokens_mistral': 218, 'n_tokens_neox': 209, 'n_words': 46}