If you think the Android project kakao-android-sdk-standalone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/**
* Copyright 2014 Kakao Corp./*fromwww.java2s.com*/
*
* Redistribution and modification in source or binary forms are not permitted without specific prior written permission.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.kakao;
import java.util.HashMap;
import java.util.Map;
// com.kakao.capri.api.exception.ApiErrorCodes? sync
/**
* API ???? ?? ??? ??
*/publicenum ErrorCode {
/**
* ??????????? ???? http ?? ?,?? ??? ???? ??. code = -777
*/
CLIENT_ERROR_CODE(-777),
/**
* SDK? ???? ??? ?? ?????
*/
UNDEFINED_ERROR_CODE(-888),
/**
* ?? ????? ???? ???? ??. code = -1
*/
INTERNAL_ERROR_CODE(-1),
/**
* ???? ???? ??????? ????? ??. code = -2
*/
INVALID_PARAM_CODE(-2),
/**
* [???????? ??? ????? ???]
* ??????? ??????? ?? ?? ????? ???? ?????? ????? ??????(??????,????) API? ??? ?? ???
* ?? API? ???? ???????? disable ????? ??. code = -3
*/
NOT_SUPPORTED_API_CODE(-3),
/**
* ????? ?? ??? ??? ??? ???? ????? ?? ????? ??. code = -10
*/
EXCEED_LIMIT_CODE(-10),
/**
* [??????? API]
* ?? ??? ?????? ???? ????? ??? ?? ?????. code = -101
*/
NOT_REGISTERED_USER_CODE(-101),
/**
* [???? ?? signup API]
* ???? ?? ??? ??? ??? ?? ?? API? ??? ?? ?????. code = -102
*/
ALREADY_REGISTERED_USER_CODE(-102),
/**
* [???? API]
* ???? ?? ??????? ??? ?? ?????. code = -103
*/
NOT_EXIST_KAKAO_ACCOUNT_CODE(-103),
/**
* [???? ?? me, signup, updateProfile API]
* ??? ???? ???? ???? ?????? ???? ???? ????? ????? ? ?? ?????.
* ??????? ? ?? ??????? ?????? user property key??? ??????? ?????? ???? ???? ????. code = -201
*/
NOT_REGISTERED_PROPERTY_KEY_CODE(-201),
/**
* ??????? ???? ?? ??? ??? ????? access token?? ??? ?? ?????. code = -301
*/
NOT_EXIST_APP_CODE(-301),
/**
* ? ????? ??????? ???? ??? ??? ?? ?????. code = -302
*/
NOT_EXIST_APP_CATEGORY_CODE(-302),
/**
* [??????? API]
* ???? ???? ?? ??? access token?? ??? ?? ?????. code = -401
*/
INVALID_TOKEN_CODE(-401),
/**
* ?? API?? ?? ???????? ?? ???? ??? ?? ?????. code = -402
*/
INVALID_SCOPE_CODE(-402),
/**
* [???? API]
* ???? ??? ????? ??? ?? ?????. code = -501
*/
NOT_EXIST_KAKAOTALK_USER_CODE(-501),
/**
* [?????? API]
* ?????? ??? ????? ??? ?? ?????. code = -601
*/
NOT_EXIST_KAKAOSTORY_USER_CODE(-601),
/**
* [?????? upload API]
* ?????? ????? ???? 5M ?? ????? ???? ????.
*/
EXCEED_MAX_UPLOAD_SIZE(-602),
/**
* ??????? ?? ??????? ?? ??? ??? ????? access token?? ??? ?? ?????. code = -701
*/
NOT_EXIST_DEVELOPER_CODE(-701),
/**
* ??????? ??????? ??? ??? ????? ? ? ?? ?? ?????. code = -9798
*/
KAKAO_MAINTENANCE_CODE(-9798);
privatefinalint errorCode;
privatestaticfinal Map<Integer, ErrorCode> reverseMap = new HashMap<Integer, ErrorCode>(17);
static {
for (ErrorCode errorCode : ErrorCode.values()) {
reverseMap.put(errorCode.getErrorCode(), errorCode);
}
}
ErrorCode(finalint errorCode) {
this.errorCode = errorCode;
}
/**
* ???? ????? ?????
* @return ???? ????? ?????
*/publicint getErrorCode() {
return errorCode;
}
/**
* ??? ?????? enum?? ???? ????.
* @param i ??? ??? ?????
* @return ????? ???? enum ?????
*/publicstatic ErrorCode valueOf(finalInteger i) {
if(i == null)
return null;
ErrorCode errorCode = reverseMap.get(i);
if(errorCode != null)
return errorCode;
elsereturn UNDEFINED_ERROR_CODE;
}
}