Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WebExceptionStatus Enum
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
WebExceptionStatus Enum
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01643817
Message ID:
01643817
Views:
25
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
Reply
Map
View

Click here to load this message in the networking platform