Sys.Net.WebServiceError Class
Introduction
Represents the object type returned to the browser when a Web service issues an error.
Namespace:
Sys.Net
Inherits: None
Members
Remarks
The WebServiceError is the type of the object returned to the failed callback function.
Example
Description
The following example shows how a failed callback function accesses the WebServiceError object. For more information, see Calling Web Services from Client Script.
Code
javascript
// This is the failed callback function.
function OnFailed(error)
{
var stackTrace = error.get_stackTrace();
var message = error.get_message();
var statusCode = error.get_statusCode();
var exceptionType = error.get_exceptionType();
var timedout = error.get_timedOut();
// Display the error.
var RsltElem =
document.getElementById("Results");
RsltElem.innerHTML =
"Stack Trace: " + stackTrace + "<br/>" +
"Service Error: " + message + "<br/>" +
"Status Code: " + statusCode + "<br/>" +
"Exception Type: " + exceptionType + "<br/>" +
"Timedout: " + timedout;
}