{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
AJAX Source Viewer
View the source code of a Method from ASP.NET AJAX Library. Choose a method from the menu items above (Namespaces, Classes, or Methods).
Method 'argumentType(paramName, actualType, expectedType, message)'
Method: argumentType(paramName, actualType, expectedType, message)
Method Full Name:     Error$argumentType(paramName, actualType, expectedType, message)
Class: Error
Namespace: Global (MicrosoftAjax.debug.js)
Source File: MicrosoftAjax.debug.js
1   Error.argumentType = function Error$argumentType(paramName, actualType, expectedType, message) {
2     /// <summary locid="M:J#Error.argumentType" />
3     /// <param name="paramName" type="String" optional="true" mayBeNull="true"></param>
4     /// <param name="actualType" type="Type" optional="true" mayBeNull="true"></param>
5     /// <param name="expectedType" type="Type" optional="true" mayBeNull="true"></param>
6     /// <param name="message" type="String" optional="true" mayBeNull="true"></param>
7     /// <returns></returns>
8     var e = Function._validateParams(arguments, [
9     {name: "paramName", type: String, mayBeNull: true, optional: true},
10    {name: "actualType", type: Type, mayBeNull: true, optional: true},
11    {name: "expectedType", type: Type, mayBeNull: true, optional: true},
12    {name: "message", type: String, mayBeNull: true, optional: true}
13    ]);
14    if (e) throw e;
15    var displayMessage = "Sys.ArgumentTypeException: ";
16    if (message) {
17      displayMessage += message;
18    }
19    else if (actualType && expectedType) {
20      displayMessage +=
21      String.format(Sys.Res.argumentTypeWithTypes, actualType.getName(), expectedType.getName());
22    }
23    else {
24      displayMessage += Sys.Res.argumentType;
25    }
26    if (paramName) {
27      displayMessage += "\n" + String.format(Sys.Res.paramName, paramName);
28    }
29    var e = Error.create(displayMessage, {
30      name: "Sys.ArgumentTypeException",
31      paramName: paramName,
32      actualType: actualType,
33      expectedType: expectedType
34      });
35    e.popStackFrame();
36    return e;
37  }
This is the JavaScript source for method argumentType(paramName, actualType, expectedType, message) from ASP.NET AJAX Library. Full name for this method is Error$argumentType(paramName, actualType, expectedType, message). It belongs to the class Error, which is in Global (MicrosoftAjax.debug.js) namespace. This source is in MicrosoftAjax.debug.js file.
Bookmark and Share This
About  Contact  Privacy Policy  Site Map