Package cn.leancloud

Class LCException

All Implemented Interfaces:
Serializable

public class LCException extends Exception
See Also:
  • Field Details

    • code

      protected final int code
    • OTHER_CAUSE

      public static final int OTHER_CAUSE
      See Also:
    • INTERNAL_SERVER_ERROR

      public static final int INTERNAL_SERVER_ERROR
      Error code indicating that something has gone wrong with the server. If you get this error code, it is AVOSCloud's fault.
      See Also:
    • CONNECTION_FAILED

      public static final int CONNECTION_FAILED
      Error code indicating the connection to the AVOSCloud servers failed.
      See Also:
    • OBJECT_NOT_FOUND

      public static final int OBJECT_NOT_FOUND
      Error code indicating the specified object doesn't exist.
      See Also:
    • INVALID_QUERY

      public static final int INVALID_QUERY
      Error code indicating you tried to query with a datatype that doesn't support it, like exact matching an array or object.
      See Also:
    • INVALID_CLASS_NAME

      public static final int INVALID_CLASS_NAME
      Error code indicating a missing or invalid classname. Classnames are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters.
      See Also:
    • MISSING_OBJECT_ID

      public static final int MISSING_OBJECT_ID
      Error code indicating an unspecified object id.
      See Also:
    • INVALID_KEY_NAME

      public static final int INVALID_KEY_NAME
      Error code indicating an invalid key name. Keys are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters.
      See Also:
    • INVALID_POINTER

      public static final int INVALID_POINTER
      Error code indicating a malformed pointer. You should not see this unless you have been mucking about changing internal AVOSCloud code.
      See Also:
    • INVALID_JSON

      public static final int INVALID_JSON
      Error code indicating that badly formed JSON was received upstream. This either indicates you have done something unusual with modifying how things encode to JSON, or the network is failing badly.
      See Also:
    • COMMAND_UNAVAILABLE

      public static final int COMMAND_UNAVAILABLE
      Error code indicating that the feature you tried to access is only available internally for testing purposes.
      See Also:
    • NOT_INITIALIZED

      public static final int NOT_INITIALIZED
      You must call AVOSCloud.initialize before using the AVOSCloud library.
      See Also:
    • INCORRECT_TYPE

      public static final int INCORRECT_TYPE
      Error code indicating that a field was set to an inconsistent type.
      See Also:
    • INVALID_CHANNEL_NAME

      public static final int INVALID_CHANNEL_NAME
      Error code indicating an invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_ characters and starts with a letter.
      See Also:
    • PUSH_MISCONFIGURED

      public static final int PUSH_MISCONFIGURED
      Error code indicating that push is misconfigured.
      See Also:
    • OBJECT_TOO_LARGE

      public static final int OBJECT_TOO_LARGE
      Error code indicating that the object is too large.
      See Also:
    • OPERATION_FORBIDDEN

      public static final int OPERATION_FORBIDDEN
      Error code indicating that the operation isn't allowed for clients.
      See Also:
    • CACHE_MISS

      public static final int CACHE_MISS
      Error code indicating the result was not found in the cache.
      See Also:
    • INVALID_NESTED_KEY

      public static final int INVALID_NESTED_KEY
      Error code indicating that an invalid key was used in a nested JSONObject.
      See Also:
    • INVALID_FILE_NAME

      public static final int INVALID_FILE_NAME
      Error code indicating that an invalid filename was used for AVFile. A valid file name contains only a-zA-Z0-9_. characters and is between 1 and 128 characters.
      See Also:
    • INVALID_ACL

      public static final int INVALID_ACL
      Error code indicating an invalid ACL was provided.
      See Also:
    • TIMEOUT

      public static final int TIMEOUT
      Error code indicating that the request timed out on the server. Typically this indicates that the request is too expensive to run.
      See Also:
    • INVALID_EMAIL_ADDRESS

      public static final int INVALID_EMAIL_ADDRESS
      Error code indicating that the email address was invalid.
      See Also:
    • INVALID_FILE_URL

      public static final int INVALID_FILE_URL
      Error code indicating that the file address was invalid.
      See Also:
    • INVALID_PHONE_NUMBER

      public static final int INVALID_PHONE_NUMBER
      用来标识手机号码格式错误的错误代码
      See Also:
    • DUPLICATE_VALUE

      public static final int DUPLICATE_VALUE
      Error code indicating that a unique field was given a value that is already taken.
      See Also:
    • INVALID_ROLE_NAME

      public static final int INVALID_ROLE_NAME
      Error code indicating that a role's name is invalid.
      See Also:
    • EXCEEDED_QUOTA

      public static final int EXCEEDED_QUOTA
      Error code indicating that an application quota was exceeded. Upgrade to resolve.
      See Also:
    • SCRIPT_ERROR

      public static final int SCRIPT_ERROR
      Error code indicating that a Cloud Code script failed.
      See Also:
    • VALIDATION_ERROR

      public static final int VALIDATION_ERROR
      Error code indicating that cloud code validation failed.
      See Also:
    • FILE_DELETE_ERROR

      public static final int FILE_DELETE_ERROR
      Error code indicating that deleting a file failed.
      See Also:
    • USERNAME_MISSING

      public static final int USERNAME_MISSING
      Error code indicating that the username is missing or empty.
      See Also:
    • PASSWORD_MISSING

      public static final int PASSWORD_MISSING
      Error code indicating that the password is missing or empty.
      See Also:
    • USERNAME_TAKEN

      public static final int USERNAME_TAKEN
      Error code indicating that the username has already been taken.
      See Also:
    • EMAIL_TAKEN

      public static final int EMAIL_TAKEN
      Error code indicating that the email has already been taken.
      See Also:
    • EMAIL_MISSING

      public static final int EMAIL_MISSING
      Error code indicating that the email is missing, but must be specified.
      See Also:
    • EMAIL_NOT_FOUND

      public static final int EMAIL_NOT_FOUND
      Error code indicating that an user with the specified email was not found.
      See Also:
    • SESSION_MISSING

      public static final int SESSION_MISSING
      Error code indicating that an user object without a valid session could not be altered.
      See Also:
    • MUST_CREATE_USER_THROUGH_SIGNUP

      public static final int MUST_CREATE_USER_THROUGH_SIGNUP
      Error code indicating that an user can only be created through signup.
      See Also:
    • ACCOUNT_ALREADY_LINKED

      public static final int ACCOUNT_ALREADY_LINKED
      Error code indicating that an an account being linked is already linked to another user.
      See Also:
    • USER_ID_MISMATCH

      public static final int USER_ID_MISMATCH
      Error code indicating that User ID mismatch.
      See Also:
    • USERNAME_PASSWORD_MISMATCH

      public static final int USERNAME_PASSWORD_MISMATCH
      Error code indicating that username and password mismatched.
      See Also:
    • USER_DOESNOT_EXIST

      public static final int USER_DOESNOT_EXIST
      Error code indicating that user doesn't exist
      See Also:
    • USER_MOBILEPHONE_MISSING

      public static final int USER_MOBILEPHONE_MISSING
       用户并没有绑定手机号码
      See Also:
    • USER_WITH_MOBILEPHONE_NOT_FOUND

      public static final int USER_WITH_MOBILEPHONE_NOT_FOUND
       没有找到绑定了该手机号的用户
      See Also:
    • USER_MOBILE_PHONENUMBER_TAKEN

      public static final int USER_MOBILE_PHONENUMBER_TAKEN
      这个号码已经绑定过别的账号了
      See Also:
    • USER_MOBILEPHONE_NOT_VERIFIED

      public static final int USER_MOBILEPHONE_NOT_VERIFIED
      这个手机号码尚未被验证过
      See Also:
    • LINKED_ID_MISSING

      public static final int LINKED_ID_MISSING
      Error code indicating that an user cannot be linked to an account because that account's id could not be found.
      See Also:
    • INVALID_LINKED_SESSION

      public static final int INVALID_LINKED_SESSION
      Error code indicating that an user with a linked (e.g. Facebook) account has an invalid session.
      See Also:
    • UNSUPPORTED_SERVICE

      public static final int UNSUPPORTED_SERVICE
      Error code indicating that a service being linked (e.g. Facebook or Twitter) is unsupported.
      See Also:
    • RATE_LIMITED

      public static final int RATE_LIMITED
      Error code indicating client is rate limited by avoscloud server.
      See Also:
    • UNKNOWN

      public static final int UNKNOWN
      Error code indicating unknown reason.
      See Also:
    • CACHE_MISSING_ERROR

      public static final String CACHE_MISSING_ERROR
      See Also:
    • FILE_DOWNLOAD_INCONSISTENT_FAILURE

      public static final int FILE_DOWNLOAD_INCONSISTENT_FAILURE
      Error code indicating the file checkSum value is not equals to original file
      See Also:
    • FILE_UPLOAD_FAILURE

      public static final int FILE_UPLOAD_FAILURE
      Error code indicating there is error whiling uploading AVFile.
      See Also:
    • INVALID_STATE

      public static final int INVALID_STATE
      See Also:
    • INVALID_PARAMETER

      public static final int INVALID_PARAMETER
      See Also:
    • CIRCLE_REFERENCE

      public static final int CIRCLE_REFERENCE
      See Also:
  • Constructor Details

    • LCException

      public LCException(int theCode, String theMessage)
      Construct a new AVException with a particular error code.
      Parameters:
      theCode - The error code to identify the type of exception.
      theMessage - A message describing the error in more detail.
    • LCException

      public LCException(String message, Throwable cause)
      Construct a new AVException with an external cause.
      Parameters:
      message - A message describing the error in more detail.
      cause - The cause of the error.
    • LCException

      public LCException(Throwable cause)
      Construct a new AVException with an external cause.
      Parameters:
      cause - The cause of the error.
  • Method Details

    • getCode

      public int getCode()
      Access the code for this error.
      Returns:
      The numerical code for this error.