Added SendError method.