Home All Groups Group Topic Archive Search About
Author
15 Dec 2006 4:22 PM
louis
is there a way when the "object required" error is thrown to examine the
"err" object (or other variable or object) to determine WHICH object caused
the error?  I can't duplicate the error on my development system, so I can't
step thru the code.
There are many objects in the routine: some are database (result!CustName)
some are from 3rd party vendors.  Problem only seems to occur when program is
heavily loaded.

Author
15 Dec 2006 7:19 PM
Ken Halter
"louis" <lo***@discussions.microsoft.com> wrote in message
news:F76141D4-2534-4075-B955-93C0B3354BEA@microsoft.com...
> is there a way when the "object required" error is thrown to examine the
> "err" object (or other variable or object) to determine WHICH object
> caused
> the error?  I can't duplicate the error on my development system, so I
> can't
> step thru the code.
> There are many objects in the routine: some are database (result!CustName)
> some are from 3rd party vendors.  Problem only seems to occur when program
> is
> heavily loaded.

The only way to find that out is to add error trapping. One "quick and easy"
way would be to add line numbers to the procedure that's raising the error,
then have the "box" that shows your error information show Erl too. Once you
have the line number, you should be able to figure out what the problem is.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Author
15 Dec 2006 9:34 PM
louis
Ken -
I know that line numbers could be put in the routine and have considered
that.  Somewhere deep in the bowls of VB (or Windows itself) lies the name of
the object that threw the error.  This error message has been around long
enough - very frustrating - that better internal reporting should be
available.
Many thanks for your prompt reply.
p.s. - read some of the info on the Remembrance site - very touching - my
deepest sympathy.
Louis


Show quoteHide quote
"Ken Halter" wrote:

> "louis" <lo***@discussions.microsoft.com> wrote in message
> news:F76141D4-2534-4075-B955-93C0B3354BEA@microsoft.com...
> > is there a way when the "object required" error is thrown to examine the
> > "err" object (or other variable or object) to determine WHICH object
> > caused
> > the error?  I can't duplicate the error on my development system, so I
> > can't
> > step thru the code.
> > There are many objects in the routine: some are database (result!CustName)
> > some are from 3rd party vendors.  Problem only seems to occur when program
> > is
> > heavily loaded.
>
> The only way to find that out is to add error trapping. One "quick and easy"
> way would be to add line numbers to the procedure that's raising the error,
> then have the "box" that shows your error information show Erl too. Once you
> have the line number, you should be able to figure out what the problem is.
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> In Loving Memory - http://www.vbsight.com/Remembrance.htm
>
>
>
Author
15 Dec 2006 9:42 PM
Ken Halter
"louis" <lo***@discussions.microsoft.com> wrote in message
news:5C354B2A-1198-4F1A-A3AC-09B4CBA0D5D3@microsoft.com...
> Ken -
> I know that line numbers could be put in the routine and have considered
> that.  Somewhere deep in the bowls of VB (or Windows itself) lies the name
> of
> the object that threw the error.  This error message has been around long
> enough - very frustrating - that better internal reporting should be
> available.

That would be nice <g>... it's the exact same type of thing you see with any
error raised by "mishandling" an object. "Someone" knows what that object
is, so why not let the rest of us in on the secret? <g> Error 429's 440's
and the rest... none show any info that actually helps us debug the problem.
I could understand if there were something missing "3 levels down" (dllA
needs dllB needs dllC but can't find it)... but, when it's a "top layer"
object, seems like a useful error message would be a trivial feature to
implement inside the language itself. Oh well <g>

> Many thanks for your prompt reply.
> p.s. - read some of the info on the Remembrance site - very touching - my
> deepest sympathy.
> Louis

Thanks for your kind words Louis... Happy holidays to you and yours.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm