Fixed exception handling in send.py.