Interface IStdErrClass
MS-VBAL 6.1.3.2 Err Class
public interface IStdErrClass
Remarks
Formalizes the public interface of the Err class.
👉 This object is a singleton that is referenced by the Err global/static symbol.
Methods
StdErrClass__Clear()
Resets all properties of the error object to their default values.
RuntimeSemanticsEvaluationResult StdErrClass__Clear()
Returns
Remarks
This method is invoked by the following statement semantics:
- MS-VBAL 5.4.4.2
Resumestatement - MS-VBAL 5.4.2.17
Exit Substatement - MS-VBAL 5.4.2.18
Exit Functionstatement - MS-VBAL 5.4.2.19
Exit Propertystatement - MS-VBAL 5.4.4.1
On Errorstatement
StdErrClass__Raise(VBRuntimeValue<int>, VBRuntimeVariantValue, VBVariantValue, VBVariantValue?, VBVariantValue?)
Generates a run-time error.
RuntimeSemanticsEvaluationResult StdErrClass__Raise(VBRuntimeValue<int> number, VBRuntimeVariantValue source, VBVariantValue description, VBVariantValue? helpFile = null, VBVariantValue? helpContext = null)
Parameters
numberVBRuntimeValue<int>A VBLongValue that encodes the nature of the error.
sourceVBRuntimeVariantValueA VBStringValue expression naming the object or application that generated the error. When setting this property for a class, use the form "project.class".
Optional: uses the current workspace application name unless specified otherwise.descriptionVBVariantValuehelpFileVBVariantValueℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
helpContextVBVariantValueℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
StdErrClass_getDescription()
MS-VBAL 6.1.3.2.1 Description Gets a VBStringValue containing a description of the error.
RuntimeSemanticsEvaluationResult StdErrClass_getDescription()
Returns
StdErrClass_getHelpContext()
MS-VBAL 6.1.3.2.2 HelpContext Gets a VBStringValue containing the HelpContextID of the error.
RuntimeSemanticsEvaluationResult StdErrClass_getHelpContext()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
ℹ️ Unsupported legacy proprietary Microsoft help system. This property is out of scope of this implementation.
StdErrClass_getHelpFile()
MS-VBAL 6.1.3.2.3 HelpFile Gets a VBStringValue containing the HelpFile of the error.
RuntimeSemanticsEvaluationResult StdErrClass_getHelpFile()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
ℹ️ Unsupported legacy proprietary Microsoft help system. This property is out of scope of this implementation.
StdErrClass_getLastDllError()
MS-VBAL 6.1.3.2.4 LastDllError Gets a VBLongValue containing a system error code produced by a call to a dynamic-link library (DLL).
RuntimeSemanticsEvaluationResult StdErrClass_getLastDllError()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
👉 Applies only to DLL calls made from VBA code. No error is raised when the LastDllError property is set (internally: this property is read-only).
StdErrClass_getNumber()
MS-VBAL 6.1.3.2.2.5 Number Gets a VBLongValue containing an error code.
RuntimeSemanticsEvaluationResult StdErrClass_getNumber()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
👉 Default member: this member is invoked by VBObjectType implicit let-coercion semantics.
StdErrClass_setDescription(VBRuntimeReference)
MS-VBAL 6.1.3.2.1 Description Sets the description of the error.
RuntimeSemanticsEvaluationResult StdErrClass_setDescription(VBRuntimeReference value)
Parameters
valueVBRuntimeReferenceA VBStringValue containing a description of the error.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
StdErrClass_setHelpContext(VBRuntimeReference)
MS-VBAL 6.1.3.2.2 HelpContext Sets the HelpContextID of the error.
RuntimeSemanticsEvaluationResult StdErrClass_setHelpContext(VBRuntimeReference value)
Parameters
valueVBRuntimeReferenceA VBStringValue containing the help context ID value.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
ℹ️ Unsupported legacy proprietary Microsoft help system. This property is out of scope of this implementation.
StdErrClass_setHelpFile(VBRuntimeReference)
MS-VBAL 6.1.3.2.3 HelpFile Sets the HelpFile of the error.
RuntimeSemanticsEvaluationResult StdErrClass_setHelpFile(VBRuntimeReference value)
Parameters
valueVBRuntimeReferenceA VBStringValue containing the help file value.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
ℹ️ Unsupported legacy proprietary Microsoft help system. This property is out of scope of this implementation.
StdErrClass_setNumber(VBRuntimeValue<int>)
MS-VBAL 6.1.3.2.2.5 Number Sets a VBLongValue containing an error code.
RuntimeSemanticsEvaluationResult StdErrClass_setNumber(VBRuntimeValue<int> value)
Parameters
valueVBRuntimeValue<int>
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.