...
/Solution: Recover from Errors Gracefully
Solution: Recover from Errors Gracefully
Let’s learn how we can recover from the missteps taken.
We'll cover the following...
Anyone who enjoys dancing knows that missteps are inevitable. The secret to remaining graceful is to understand how to recover. We must give ourselves a chance to notice the cause of the mistake. Then we can react quickly and seamlessly, getting back into rhythm before anyone has seen our gaffe.
Maintain the rhythm
Checking return status and exceptions from database API calls is the best way to ensure that we haven’t missed a step. The following example shows code that checks the ...