It's a standard pattern for releasing locks. Regardless of whether or not an exception is thrown, we want to release the write lock.