I wanted to know how to gracefully handle all exceptions that can possibly arise due to db CRUD operations.
In case of any exception, MongoException can be caught and analyzed what went wrong, it may be due to db server/ network/ time out issues . In the most recent version of Morphia, there is a way to catch these exceptions.
But I needed info about expected exceptions that can arise for each of the below operations i.e best way to know if operation succeeded or failed.
- get/find
- merge
- update
- delete
- save.
Can someone suggest the best possible way to handle this? I seem to be lil stuck on this as docs dint help.
Thanks :)