Package com.parse

Class ParseException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ParseException
    extends java.lang.Exception
    A ParseException gets raised whenever a ParseObject issues an invalid request, such as deleting or editing an object that no longer exists on the server, or when there is a network failure preventing communication with the Parse server.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ACCOUNT_ALREADY_LINKED
      Error code indicating that an an account being linked is already linked to another user.
      static int CACHE_MISS
      Error code indicating the result was not found in the cache.
      static int COMMAND_UNAVAILABLE
      Error code indicating that the feature you tried to access is only available internally for testing purposes.
      static int CONNECTION_FAILED
      Error code indicating the connection to the Parse servers failed.
      static int DUPLICATE_VALUE
      Error code indicating that a unique field was given a value that is already taken.
      static int EMAIL_MISSING
      Error code indicating that the email is missing, but must be specified.
      static int EMAIL_NOT_FOUND
      Error code indicating that a user with the specified email was not found.
      static int EMAIL_TAKEN
      Error code indicating that the email has already been taken.
      static int EXCEEDED_QUOTA
      Error code indicating that an application quota was exceeded.
      static int FILE_DELETE_ERROR
      Error code indicating that deleting a file failed.
      static int INCORRECT_TYPE
      Error code indicating that a field was set to an inconsistent type.
      static int INVALID_ACL
      Error code indicating an invalid ACL was provided.
      static int INVALID_CHANNEL_NAME
      Error code indicating an invalid channel name.
      static int INVALID_CLASS_NAME
      Error code indicating a missing or invalid classname.
      static int INVALID_EMAIL_ADDRESS
      Error code indicating that the email address was invalid.
      static int INVALID_EVENT_NAME
      Error code indicating that the provided event name is invalid.
      static int INVALID_FILE_NAME
      Error code indicating that an invalid filename was used for ParseFile.
      static int INVALID_JSON
      Error code indicating that badly formed JSON was received upstream.
      static int INVALID_KEY_NAME
      Error code indicating an invalid key name.
      static int INVALID_LINKED_SESSION
      Error code indicating that a user with a linked (e.g.
      static int INVALID_NESTED_KEY
      Error code indicating that an invalid key was used in a nested JSONObject.
      static int INVALID_POINTER
      Error code indicating a malformed pointer.
      static 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.
      static int INVALID_ROLE_NAME
      Error code indicating that a role's name is invalid.
      static int INVALID_SESSION_TOKEN
      Error code indicating that the current session token is invalid.
      static int LINKED_ID_MISSING
      Error code indicating that a user cannot be linked to an account because that account's id could not be found.
      static int MISSING_OBJECT_ID
      Error code indicating an unspecified object id.
      static int MISSING_REQUIRED_FIELD_ERROR
      Error code indicating that required field is missing.
      static int MUST_CREATE_USER_THROUGH_SIGNUP
      Error code indicating that a user can only be created through signup.
      static int NOT_INITIALIZED
      You must call Parse.initialize before using the Parse library.
      static int OBJECT_NOT_FOUND
      Error code indicating the specified object doesn't exist.
      static int OBJECT_TOO_LARGE
      Error code indicating that the object is too large.
      static int OPERATION_FORBIDDEN
      Error code indicating that the operation isn't allowed for clients.
      static int OTHER_CAUSE  
      static int PASSWORD_MISSING
      Error code indicating that the password is missing or empty.
      static int PUSH_MISCONFIGURED
      Error code indicating that push is misconfigured.
      static int REQUEST_LIMIT_EXCEEDED
      Error code indicating that the application has exceeded its request limit.
      static int SCRIPT_ERROR
      Error code indicating that a Cloud Code script failed.
      static int SESSION_MISSING
      Error code indicating that a user object without a valid session could not be altered.
      static int TIMEOUT
      Error code indicating that the request timed out on the server.
      static int UNSUPPORTED_SERVICE
      Error code indicating that a service being linked (e.g.
      static int USERNAME_MISSING
      Error code indicating that the username is missing or empty.
      static int USERNAME_TAKEN
      Error code indicating that the username has already been taken.
      static int VALIDATION_ERROR
      Error code indicating that cloud code validation failed.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseException​(int theCode, java.lang.String theMessage)
      Construct a new ParseException with a particular error code.
      ParseException​(int theCode, java.lang.String message, java.lang.Throwable cause)
      Construct a new ParseException with an external cause.
      ParseException​(java.lang.Throwable cause)
      Construct a new ParseException with an external cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Access the code for this error.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CONNECTION_FAILED

        public static final int CONNECTION_FAILED
        Error code indicating the connection to the Parse servers failed.
        See Also:
        Constant Field Values
      • OBJECT_NOT_FOUND

        public static final int OBJECT_NOT_FOUND
        Error code indicating the specified object doesn't exist.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • MISSING_OBJECT_ID

        public static final int MISSING_OBJECT_ID
        Error code indicating an unspecified object id.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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 Parse code.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • NOT_INITIALIZED

        public static final int NOT_INITIALIZED
        You must call Parse.initialize before using the Parse library.
        See Also:
        Constant Field Values
      • INCORRECT_TYPE

        public static final int INCORRECT_TYPE
        Error code indicating that a field was set to an inconsistent type.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • PUSH_MISCONFIGURED

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

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

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

        public static final int CACHE_MISS
        Error code indicating the result was not found in the cache.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_FILE_NAME

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

        public static final int INVALID_ACL
        Error code indicating an invalid ACL was provided.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_EMAIL_ADDRESS

        public static final int INVALID_EMAIL_ADDRESS
        Error code indicating that the email address was invalid.
        See Also:
        Constant Field Values
      • MISSING_REQUIRED_FIELD_ERROR

        public static final int MISSING_REQUIRED_FIELD_ERROR
        Error code indicating that required field is missing.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_ROLE_NAME

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

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

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

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

        public static final int FILE_DELETE_ERROR
        Error code indicating that deleting a file failed.
        See Also:
        Constant Field Values
      • REQUEST_LIMIT_EXCEEDED

        public static final int REQUEST_LIMIT_EXCEEDED
        Error code indicating that the application has exceeded its request limit.
        See Also:
        Constant Field Values
      • INVALID_EVENT_NAME

        public static final int INVALID_EVENT_NAME
        Error code indicating that the provided event name is invalid.
        See Also:
        Constant Field Values
      • USERNAME_MISSING

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

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

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

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

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

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

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

        public static final int MUST_CREATE_USER_THROUGH_SIGNUP
        Error code indicating that a user can only be created through signup.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_SESSION_TOKEN

        public static final int INVALID_SESSION_TOKEN
        Error code indicating that the current session token is invalid.
        See Also:
        Constant Field Values
      • LINKED_ID_MISSING

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

        public static final int INVALID_LINKED_SESSION
        Error code indicating that a user with a linked (e.g. Facebook) account has an invalid session.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
    • Constructor Detail

      • ParseException

        public ParseException​(int theCode,
                              java.lang.String theMessage)
        Construct a new ParseException 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.
      • ParseException

        public ParseException​(int theCode,
                              java.lang.String message,
                              java.lang.Throwable cause)
        Construct a new ParseException with an external cause.
        Parameters:
        message - A message describing the error in more detail.
        cause - The cause of the error.
      • ParseException

        public ParseException​(java.lang.Throwable cause)
        Construct a new ParseException with an external cause.
        Parameters:
        cause - The cause of the error.
    • Method Detail

      • getCode

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