added a send exception function