Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/Catch Routine Not Working
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00985235
Message ID:
00985275
Vues:
31
Einar,
Oops. My mistake. The error was actually being thrown outside the try/catch routine because I was trying to change the connection string while the connection was still open (1st line of code below).

oSQLConn.ConnectionString = cConnectionString;
try
{
oSQLConn.Open();
return oSQLConn.State.ToString();
}
catch
{
return "Failed";
}

Thanks for your help!

BTW: In this thread you mentioned "Throwing the error back on the stack". Would this cause the error to be caught by the next applicable Catch routine?

Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform