added a try/catch to the send method