handling exceptions during send