Java – why not throw an exception in objectify’s put() function?
•
Java
The gae native put() function throws some exceptions when it fails
But objectify's put () function never throws any exceptions, as described in objectify Javadoc
This is my problem
If objectify's put() function does not throw an exception, how can I detect possible errors during the execution of the put() function?
Solution
Objectify's method will never swallow any native data store exceptions
However, some runtime exceptions are omitted from the API
In this case, objectify's put () method throws an exception that may be thrown by the put () method of the native data store
This problem related to the omitted runtime exception is submitted in the problem page of objectify (Reference: http://code.google.com/p/objectify-appengine/issues/list )
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码