Re: VB6 Raise Error w/ Custom Description being replaced w/ desc for e

Tech-Archive recommends: Fix windows errors by optimizing your registry



Robb wrote:
I'm using VB 6.0, Service Pack 6, on an XP machine.

I'm raising an error with a custom Description in a DLL.

Err.Rasie 106,"MySource","My Custom Description"

When the invoking DLL catches the error the custom description has been replaced with the default VB description for the error number I raised. And the Err.Source is blank.

Err.Number = 106
Err.Source = blank
Err.Description = Application-defined or Object-defined error

Any ideas as to why my "custom description" is being lost?


You can't pick just any number as if from a hat.

If you simply read the help entry for the Raise method, you'll see.




Bob
--
.



Relevant Pages