Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WebExceptionStatus Enum
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
WebExceptionStatus Enum
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01643817
Message ID:
01643817
Vues:
26
Hi everybody,

In this link https://msdn.microsoft.com/en-us/library/system.net.webexceptionstatus.aspx?f=255&MSPPError=-2147217396 I see

This API supports the product infrastructure and is not intended to be used directly from your code.
Defines status codes for the WebException class.

What exactly does it mean? Is this code valid and can the WebException be properly caught?
 catch (WebException we)
                    {
                        if (we.Status == WebExceptionStatus.Timeout)
                        {
                            nTries++; // increment number of tries
                        }
                        else
                        {                           
                            throw we; // re-throw exception
                        }
                    }
Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform