ThrowError Property  

Enable or disable error handling by the container of the control.


object.ThrowError [= { True | False } ]


Error handling for methods can be done in either of two different styles, according to the value of this property.

If the ThrowError property is set to False, methods will not raise an exception if an error occurs. Instead, the application should check the return value of the method and report any errors based on that value. It is the responsibility of the application to interpret the error code and take an appropriate action. This is the default value for the property.

If the ThrowError property is set to True, any method which generates an error will cause the component to raise an exception which must be handled or the application will terminate.

Note that if an error occurs while a property value is being accessed, an error will be raised regardless of the value of this property. This property only controls how errors are handled when calling methods.

Data Type


See Also

LastError Property, OnError Event