HttpServerUtility.GetLastError Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the previous exception.
public:
Exception ^ GetLastError();
public Exception GetLastError ();
member this.GetLastError : unit -> Exception
Public Function GetLastError () As Exception
Returns
The previous exception that was thrown.
Examples
The following example prints a description of the application's last error to the HTTP output stream. It prints "No Errors" if no errors have been encountered.
Exception LastError;
String ErrMessage;
LastError = Server.GetLastError();
if (LastError != null)
ErrMessage = LastError.Message;
else
ErrMessage = "No Errors";
Response.Write("Last Error = " + ErrMessage);
Dim LastError As Exception
Dim ErrMessage As String
LastError = Server.GetLastError()
If Not LastError Is Nothing Then
ErrMessage = LastError.Message
Else
ErrMessage = "No Errors"
End If
Response.Write("Last Error = " & ErrMessage)
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.