android - Parse.com 查询 getFirst() 异常

标签 android parsing parse-platform

query.getFirst() 真正返回什么?

Retrieves at most one ParseObject that satisfies this query. Uses the network and/or the cache, depending on the cache policy. This mutates the ParseQuery. Returns: A ParseObject obeying the conditions set in this query, or null if none found. Throws: ParseException - Throws a ParseException if no object is found.

首先是说没有找到对象返回null。 之后它说会出现找不到对象的异常..

它到底有什么作用?

谢谢。

最佳答案

方法抛出ParseException,在 Parse-1.7.1 SDK 上测试

e = {com.parse.ParseException@831697061768}"com.parse.ParseException: no results found for query"
code = 101
cause = {com.parse.ParseException@831697061768}"com.parse.ParseException: no results found for query"
detailMessage = {java.lang.String@831697061808}"no results found for query"
stackState = {int[266]@831697061912}
stackTrace = {java.lang.StackTraceElement[0]@831693444272}
suppressedExceptions = {java.util.Collections$EmptyList@831693442224} size = 0

关于android - Parse.com 查询 getFirst() 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27330006/

相关文章:

android - 奥利奥 : how to find all restricted syscalls at source code?

javascript - 公共(public)变量未正确更改

android - 内容提供者 INSTALL_FAILED_CONFLICTING_PROVIDER(将内容提供者安装为单独的 apk)

android - crunchPngs 在 Android buildTypes 中意味着什么?

ruby - 如何选择具有特定扩展名的文件? ruby

php - php JSON解析问题

java - 在Play框架中解析Multipart请求

ios - iOS Parse框架和Facebook clientKey

objective-c - Parse Cloud 中的主 key 是什么?

Android:ListView 中的许多 Edittexts