Creates an Error object that can contain additional error information.
var err = Error.create(message, errorInfo);
(Optional)An error message string.
An Error object.
The following example shows how to create a new Error object by using the create function. Three errors are created. The first error is an Sys.ArgumentTypeException exception. The second error provides a message string that is passed in the message argument. The third error provides an error message string and an object that is passed in the errorInfo argument. The errorInfo object provides the required name field that identifies the error and an additional field that describes the error.