<commit_before>// Copyright (c) 2012 Plenluno All rights reserved.

#ifndef LIBJ_ERROR_H_
#define LIBJ_ERROR_H_

#include "libj/status.h"

namespace libj {

class Error : LIBJ_STATUS(Error)
 public:
    enum Code {
        ANY = 1,
        TIMEOUT,
        ILLEGAL_ARGUMENT,
        ILLEGAL_STATE,
        ILLEGAL_TYPE,
        INDEX_OUT_OF_BOUNDS,
        NO_SUCH_ELEMENT,
        UNSUPPORTED_VERSION,
        UNSUPPORTED_OPERATION,
    };

    static CPtr create(Int code);
    static CPtr create(Int code, String::CPtr msg);
};

}  // namespace libj

#endif  // LIBJ_ERROR_H_<commit_msg>add new codes to libj::Error<commit_after>// Copyright (c) 2012 Plenluno All rights reserved.

#ifndef LIBJ_ERROR_H_
#define LIBJ_ERROR_H_

#include "libj/status.h"

namespace libj {

class Error : LIBJ_STATUS(Error)
 public:
    enum Code {
        ANY = 1,
        TIMEOUT,
        ILLEGAL_ARGUMENT,
        ILLEGAL_DATA_FORMAT,
        ILLEGAL_REQUEST,
        ILLEGAL_RESPONSE,
        ILLEGAL_STATE,
        ILLEGAL_TYPE,
        INDEX_OUT_OF_BOUNDS,
        NO_SUCH_ELEMENT,
        NO_SUCH_FIELD,
        NO_SUCH_METHOD,
        NULL_POINTER,
        UNSUPPORTED_VERSION,
        UNSUPPORTED_OPERATION,
    };

    static CPtr create(Int code);
    static CPtr create(Int code, String::CPtr msg);
};

}  // namespace libj

#endif  // LIBJ_ERROR_H_
{'fraction_non_alphanumeric': 0.08035714285714286, 'fraction_numerical': 0.00744047619047619, 'mean_word_length': 2.5301837270341205, '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': '4970193', 'n_tokens_mistral': 517, 'n_tokens_neox': 477, 'n_words': 101}