Provides static functions that extend the built-in ECMAScript (JavaScript) Error type by including exception details and support for application-compilation modes (debug or release). Error Type Extensions

see

{@link http://msdn.microsoft.com/en-us/library/bb310947(v=vs.100).aspx}

Index

Call signatures

Construct signatures

Properties

Methods

Call signatures

(message?: string): Error

Parameters

  • message?: string optional

Returns

Error

Construct signatures

constructor(message?: string): Error

Parameters

  • message?: string optional

Returns

Error

Properties

public message: string

public name: string

public prototype: Error

Methods

public argument(paramName?: any, message?: string): Error

Creates an Error object that represents the Sys.ArgumentException exception.

Parameters

  • paramName?: any optional
  • message?: string optional

Returns

Error

public argumentNull(paramName?: any, message?: string): Error

Creates an Error object that represents the Sys.ArgumentNullException exception.

Parameters

  • paramName?: any optional
  • message?: string optional

Returns

Error

public argumentOutOfRange(paramName?: string, actualValue?: any, message?: string): Error

Creates an Error object that represents the Sys.ArgumentOutOfRangeException exception.

Parameters

  • paramName?: string optional
  • actualValue?: any optional
  • message?: string optional

Returns

Error

public argumentType(paramName?: string, actualType?: any, expectedType?: any, message?: string): Error

Creates an Error object that represents the Sys.ArgumentTypeException exception.

Parameters

  • paramName?: string optional
  • actualType?: any optional
  • expectedType?: any optional
  • message?: string optional

Returns

Error

public argumentUndefined(paramName?: string, message?: string): Error

Creates an Error object that represents the Sys.ArgumentUndefinedException exception.

Parameters

  • paramName?: string optional
  • message?: string optional

Returns

Error

public create(message?: string, errorInfo?: Object): Error

Creates an Error object that can contain additional error information.

Parameters

  • message?: string optional
  • errorInfo?: Object optional

Returns

Error

public format(message?: string): Error

Creates an Error object that represents the Sys.FormatException exception.

Parameters

  • message?: string optional

Returns

Error

public invalidOperation(message?: string): Error

Creates an Error object that represents the Sys.InvalidOperationException exception.

Parameters

  • message?: string optional

Returns

Error

public notImplemented(message?: string): Error

Creates an Error object that represents the Sys.NotImplementedException exception.

Parameters

  • message?: string optional

Returns

Error

public parameterCount(message?: string): Error

Creates an Error object that represents the Sys.ParameterCountException exception.

Parameters

  • message?: string optional

Returns

Error

public popStackFrame()

Updates the fileName and lineNumber properties of an Error instance to indicate where the error was thrown instead of where the error was created. Use this function if you are creating custom error types.