Error Codes

When the error codes escape from a system to clients, then they are supposed to find the solution based on the code. Forcing users to decrypt error code and find a solution is very irritating.

public class ExceptionErrorCodes {

    public static final int FIELD_MUST_BE_EMPTY = 101;

    public static final int FIELD_MUST_NOT_BE_EMPTY = 102;

    public static final int CANNOT_RETRIEVE_TASK = 103;

    public static final int FIELD_CANNOT_BE_MODIFIED = 104;

    public static final int MYBATIS_EXCEPTION = 103;

    public static final int CSV_INVALID_FIELD_EXCEPTION = 104;

    public static final int CSV_NO_HEADER_FOUND_EXCEPTION = 105;

    public static final int FILE_UPLOAD_EXCEPTION = 107;

    public static final int CATCHALL_EXCEPTION = 999;
}

Last updated