diff options
Diffstat (limited to 'java/src/com/zerotierone/sdk/ResultCode.java')
-rw-r--r-- | java/src/com/zerotierone/sdk/ResultCode.java | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/java/src/com/zerotierone/sdk/ResultCode.java b/java/src/com/zerotierone/sdk/ResultCode.java index 7597c0f2..bb73f68c 100644 --- a/java/src/com/zerotierone/sdk/ResultCode.java +++ b/java/src/com/zerotierone/sdk/ResultCode.java @@ -27,12 +27,41 @@ package com.zerotierone.sdk; +/** + * Function return code: OK (0) or error results + * + * <p>Use {@link ResultCode#isFatal) to check for a fatal error. If a fatal error + * occurs, the node should be considered to not be working correctly. These + * indicate serious problems like an inaccessible data store or a compile + * problem.</p> + */ public enum ResultCode { - + /** + * Operation completed normally + */ RESULT_OK(0), + + // Fatal errors (> 0, < 1000) + /** + * Ran out of memory + */ RESULT_FATAL_ERROR_OUT_OF_MEMORY(1), + + /** + * Data store is not writable or has failed + */ RESULT_FATAL_ERROR_DATA_STORE_FAILED(2), + + /** + * Internal error (e.g. unexpected exception indicating bug or build problem) + */ RESULT_FATAL_ERROR_INTERNAL(3), + + // non-fatal errors + + /** + * Network ID not valid + */ RESULT_ERROR_NETWORK_NOT_FOUND(1000); private final int id; |