projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git]
/
service
/
notification
/
android
/
notification-service
/
src
/
main
/
java
/
org
/
iotivity
/
service
/
ns
/
common
/
NSErrorCode.java
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
(executable)
--- 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;
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", ""),
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"),
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 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