X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fnotification%2Fandroid%2Fnotification-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fservice%2Fns%2Fcommon%2FNSErrorCode.java;h=ef2c50d29dbf21eff247ce323ba4d46f8c33ad24;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=ee73d6c257ed629accf41bf957a2d73892f1843a;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/common/NSErrorCode.java b/service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/common/NSErrorCode.java index ee73d6c..ef2c50d 100755 --- a/service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/common/NSErrorCode.java +++ b/service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/common/NSErrorCode.java @@ -20,8 +20,12 @@ package org.iotivity.service.ns.common; -public enum NSErrorCode -{ +/** + * + * This enum provides details of error code messages thrown in NSException. + * + */ +public enum NSErrorCode { OK("OK", ""), ERROR("ERROR", ""), SUCCESS("SUCCESS", ""), @@ -29,43 +33,37 @@ public enum NSErrorCode ALLOW("ALLOW", ""), DENY("DENY", ""), JNI_EXCEPTION("JNI_EXCEPTION", "Generic Java binder error"), - JNI_NO_NATIVE_OBJECT("JNI_NO_NATIVE_OBJECT", ""), - JNI_INVALID_VALUE("JNI_INVALID_VALUE", ""),; + JNI_NO_NATIVE_OBJECT("JNI_NO_NATIVE_POINTER", ""), + JNI_INVALID_VALUE("JNI_INVALID_VALUE", ""), + NATIVE_EXCEPTION("NATIVE_EXCEPTION", ""); private String error; private String description; - private NSErrorCode(String error, String description) -{ - this.error = error; - this.description = description; -} + private NSErrorCode(String error, String description) { + this.error = error; + this.description = description; + } -public String getError() -{ - return error; -} + public String getError() { + return error; + } -public String getDescription() -{ - return description; -} + public String getDescription() { + return description; + } -public static NSErrorCode get(String errorCode) -{ - for (NSErrorCode eCode : NSErrorCode.values()) - { - if (eCode.getError().equals(errorCode)) - { - return eCode; + public static NSErrorCode get(String errorCode) { + for (NSErrorCode eCode : NSErrorCode.values()) { + if (eCode.getError().equals(errorCode)) { + return eCode; + } } + throw new IllegalArgumentException("Unexpected NSErrorCode value"); } - throw new IllegalArgumentException("Unexpected NSErrorCode value"); -} -@Override -public String toString() -{ - return error + (description.isEmpty() ? "" : " : " + description); + @Override + public String toString() { + return error + (description.isEmpty() ? "" : " : " + description); + } } -} \ No newline at end of file