Sideway
output.to from Sideway






Draft for Information Only

VBScript Methods of Err Object

Some typical predefined Elements are.

  • Err Object:
    • Clear Method
    • Raise Method

Clear Method

last updated 2017/12/10

is to clear all property settings of the Err object.

Syntax

Err.Clear

Argument

Err.ClearRequired Keywords. The keywords used to specify the Clear Method of the Err Object.

Remarks

  • The object instance is always the Err object.
  • Clear Method is used to explicitly clear the Err object after an error has been handled.
  • This can be useful, for example, when error handling is deffered with On Error Resume Next.
  • Visual Basic Scripting Edition (VBScript) calls the Clear method automatically whenever the On Error Resume Next statement is executed.

Requirement

1

Applied to

Err Object

Raise Method

last updated 2017/12/10

is to generate a run-time error result of the given number and together with other specifed optional source, description, helpfile, helpcontext in the Err Object.

Syntax

Err.Raise(number[, source, description, helpfile, helpcontext])

Argument

Err.RaiseRequired Keywords. The keywords used to specify the Raise Method of the Err Object. numberRequired. A Long integer subtype that identifies the nature of the error. VBScript errors (both VBScript-defined and user-defined errors) are in the range 0–65535.sourceOptional. A string expression naming the object or application that originally generated the error. When setting this property for an Automation object, use the form project.class. If nothing is specified, the programmatic ID of the current VBScript project is used.descriptionOptional. A string expression describing the error. If unspecified, the value in number is examined. If it can be mapped to a VBScript run-time error code, a string provided by VBScript is used as description. If there is no VBScript error corresponding to number, a generic error message is used.helpfileOptional. The fully qualified path to the Help file in which help on this error can be found. If unspecified, VBScript uses the fully qualified drive, path, and file name of the VBScript Help file.helpcontextOptional. The context ID identifying a topic within helpfile that provides help for the error. If omitted, the VBScript Help file context ID for the error corresponding to the number property is used, if it exists.

Remarks

  • All the arguments are optional except number.
  • If using Raise Method, however, without specifying some arguments, and the property settings of the Err object contain values that have not been cleared, those values become the values for the error.
  • When setting the number property to the error code in an Automation object, the error code number is addd to the constant vbObjectError. For example, to generate the error number 1050, assign vbObjectError + 1050 to the number property.

Requirement

1

Applied to

Err Object

©sideway

ID: 180500012 Last Updated: 2018/5/12 Revision:

IMAGE

Home (1)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (334)new

Reference (60)

Computer

Hardware (148)

Software

Application (187)

Digitization (24)

Numeric (19)

Programming

Web (533)

HTML

Knowledge Base

Common Color (1)

Html Entity (Unicode) (1)

Html 401 Special (1)

OS (366)

MS Windows

Windows10 (1)

DeskTop (5)

Knowledge

Mathematics

Formulas (8)

Number Theory (128)new

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)


facebook
Latest Updated Links

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