public void ThrowExactTargetException()
{
string mySelectQuery = "SELECT * FROM NONEXISTINGTABLE";
ExactTargetConnection exactTargetConnection =
new ExactTargetConnection(
"user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;");
ExactTargetCommand exactTargetCommand = new ExactTargetCommand(mySelectQuery,exactTargetConnection);
try
{
exactTargetCommand.Connection.Open();
}
catch (ExactTargetException myException)
{
MessageBox.Show("Message: " + myException.Message + "\n");
}
}