Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns or sets the numeric value associated with a specific error. The Error object's default property is number.
object.number [= errorNumber]
Arguments
- object
Any instance of the Error object.
- errorNumber
An integer representing an error.
Remarks
An error number is a 32-bit value. The upper 16-bit word is the facility code, while the lower word is the actual error code.
The following example illustrates the use of the number property:
try
x = y // Cause an error.
catch(var e){ // Create local variable e.
document.write(e) // Prints "[object Error]".
document.write(e.number>>16 & 0x1FFF) // Prints 10, the facility code.
document.write(e.number & 0xFFFF) // Prints 5009, the error code.
document.write(e.description) // Prints "'y' is undefined".
}
Requirements
Applies To: Error Object (JScript 5.6)
See Also
Reference
description Property (JScript 5.6)
message Property (JScript 5.6)
name Property (JScript 5.6)