Sideway
output.to from Sideway





Err Propertynew


Draft for Information Only

VBScript Properties of Err Object

Some typical predefined Elements are.

  •  Object:
    •  Description Property
    •  Item Property
    •  Key Property
    •  CompareMode Property

Description Property

last updated 2017/12/10

is to set, if optional stringexpression is given, or to return the Description Property Value of Err Object.

Syntax

Err.Description [= stringexpression]

Argument

Err.DescriptionRequired Keywords. The keywords used to specify the Description Property of the Err Object.stringexpressionOptionial. But required for setting a string expression containing a description of the error.=Optionial. But required as assigning equal to operator for setting the value of Description to stringexpression.

Remarks

  • The Description property consists of a short description of the error.
  • This property can be used to alert the user to an error that is not handled.
  • This property can be used to assign a short description of the error for generating a user-defined error.
  • If Description isn't filled in, and the value of Number corresponds to a VBScript run-time error, the descriptive string associated with the error is returned.

Requirement

1

Applied to

Err Object

HelpContext Property

last updated 2017/12/10

is to set, if optional contextID is given, or to return the context ID for a topic in a Help File of Err Object.

Syntax

Err.HelpContext [= contextID]

Argument

Err.HelpContextRequired Keywords. The keywords used to specify the HelpContext Property of the Err Object.contextIDOptionial. But required for setting a valid identifier for a Help topic within the Help file.=Optionial. But required as assigning equal to operator for setting the value of HelpContext to contextID.

Remarks

  • If a Help file is specified in HelpFile, the HelpContext property is used to automatically display the Help topic identified.
  • If both HelpFile and HelpContext are empty, the value of the Number property is checked.
  • If it corresponds to a VBScript run-time error value, then the VBScript Help context ID for the error is used.
  • If the Number property doesn't correspond to a VBScript error, the contents screen for the VBScript Help file is displayed.

Requirement

2

Applied to

Err Object

HelpFile Property

last updated 2017/12/10

is to set, if optional contextID is given, or to return the fully qualified path to a Help File of Err Object.

Syntax

Err.HelpFile [= contextID]

Argument

Err.HelpFileRequired Keywords. The keywords used to specify the HelpFile Property of the Err Object.contextIDOptionial. But required for setting a fully qualified path to the Help file.=Optionial. But required as assigning equal to operator for setting the value of HelpFile to contextID.

Remarks

  • If a Help file is specified in HelpFile, it is automatically called when the user clicks the Help button (or presses the F1 key) in the error message dialog box.
  • If the HelpContext property contains a valid context ID for the specified file, that topic is automatically displayed.
  • If no HelpFile is specified, the VBScript Help file is displayed.

Requirement

2

Applied to

Err Object

Number Property

last updated 2017/12/10

is to set, if optional errornumber is given, or to return numeric Number value of Err Object.

Syntax

Err.Number [= errornumber]

Argument

Err.NumberRequired Keywords. The keywords used to specify the Number Property of the Err Object.errornumberOptionial. But required for setting an integer representing a VBScript error number or an SCODE error value.=Optionial. But required as assigning equal to operator for setting the value of Number to errornumber.

Remarks

  • Number is the Err object's default property.
  • When returning a user-defined error from an Automation object, set Err.Number by adding the pre-defined number as an error code to the constant vbObjectError.

Requirement

1

Applied to

Err Object

Source Property

last updated 2017/12/10

is to set, if optional stringexpression is given, or to return the Source Property of Err Object containing the object or application name that originally generated the error.

Syntax

Err.Source [= stringexpression]

Argument

Err.SourceRequired Keywords. The keywords used to specify the Source Property of the Err Object.stringexpressionOptionial. But required for setting a string expression representing the application that generated the error.=Optionial. But required as assigning equal to operator for setting the value of Source to stringexpression.

Remarks

  • The Source property specifies a string expression that is usually the class name or programmatic ID of the object that caused the error. Use Source to provide your users with information when your code is unable to handle an error generated in an accessed object. For example, if you access Microsoft Excel and it generates a Division by zero error, Microsoft Excel sets Err.Number to its error code for that error and sets Source to Excel.Application. Note that if the error is generated in another object called by Microsoft Excel, Excel intercepts the error and sets Err.Number to its own code for Division by zero. However, it leaves the other Err object (including Source) as set by the object that generated the error.
  • Source always contains the name of the object that originally generated the error — your code can try to handle the error according to the error documentation of the object you accessed. If your error handler fails, you can use the Err object information to describe the error to your user, using Source and the other Err to inform the user which object originally caused the error, its description of the error, and so forth.
  • When generating an error from code, Source is your application's programmatic ID.

Requirement

1

Applied to

Err Object

©sideway

ID: 180500013 Last Updated: 2018/5/13 Revision:

IMAGE

Home (1)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (330)

Reference (60)

Computer

Hardware (131)

Software

Application (184)

Digitization (22)

Numeric (19)

Programming

Web (476)new

HTML

Knowledge Base

Common Color (1)

Html Entity (Unicode) (1)

Html 401 Special (1)

OS (296)new

MS Windows

Windows10 (1)

DeskTop (5)

Knowledge

Mathematics

Formulas (7)

Number Theory (51)

Algebra (14)

Trigonometry (18)

Geometry (18)

Calculus (66)

Engineering

Tables (8)

Mechanical

Control

Process Control (1)

Mechanics (1)

Rigid Bodies

Statics & Dynamics (128)

Fluid (5)

Fluid Kinematics (5)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)


Copyright © 2000-2018 Sideway . All rights reserved Disclaimersfacebook last modified on 08 Mar 2018