Trying to trap errors using err.raise from VB6 Prof. Ed. Even though "break
on unhandled errors" is set, the following dialog box is presented when an
error is detected in a simple program designed to signal too much input for
a SSN.
Run-time error '-2147220503(800403e9)'
SSN Too Long
Continue (grayed out!) End (gasp!) Debug (gasp again!) Help
The specific statement is: Err.Raise vbObjectError+1001,"Person","SSN Too
Long"
If the vbObjectError portion is removed, the message changes to read:
Run-time error 1001
SSN Too Long
Continue (grayed out!) End (gasp!) Debug (gasp again!) Help
That is, VB 6.0 seems to treat the err.raise as virtually
fatal and posts only the message but gives no viable recovery
options. Setting the break on error options differently only worsens the
matter. I can
find no information on this problem at the Microsoft site so I do
worry about it somehow being a 'local' problem. Am running NT 4, SP4
as well as the above. Would greatly appreciate any assistance as this
behavior inhibits general error handling coding we are trying to implement.