Begin-Rescue blocks are implemented for error handling.