vb ignores "on error goto label" 
Author Message
 vb ignores "on error goto label"

Hello,

I am developping a ActiveX component in Vb6 SP5 that uses a external
COM-class written in C++ .

In a function that uses this COM-Class and where I explicitly mention "on
error goto" I still get an VB custom error handling message . The error vb
throws , says that the error is in the procedure that calls the COM-function
,  not the COM-function itself . The error infact is in the COM-function ,
because in many cases the function runs without errors .

Why does vb ignore my "On Error Goto" ?

Has anybody had the same problem ?

Hoping to hear from you .

Filip W.
C3



Sun, 07 Nov 2004 16:49:19 GMT  
 vb ignores "on error goto label"
If you believe that error message is not in COM function I think you have to
check Error trapping options, go to Tools menu and then Options and select
General, in 'Error Trapping' section it must be set 'Break in Class Module'.

  Hope it helps, Saeid


Quote:
> Hello,

> I am developping a ActiveX component in Vb6 SP5 that uses a external
> COM-class written in C++ .

> In a function that uses this COM-Class and where I explicitly mention "on
> error goto" I still get an VB custom error handling message . The error vb
> throws , says that the error is in the procedure that calls the
COM-function
> ,  not the COM-function itself . The error infact is in the COM-function ,
> because in many cases the function runs without errors .

> Why does vb ignore my "On Error Goto" ?

> Has anybody had the same problem ?

> Hoping to hear from you .

> Filip W.
> C3



Sun, 07 Nov 2004 17:29:53 GMT  
 vb ignores "on error goto label"
Hello,

I have checked the settings, and these are allready set like you described .

Somebody any other suggestion ?

Greeting,

Filip W.

Quote:
> If you believe that error message is not in COM function I think you have
to
> check Error trapping options, go to Tools menu and then Options and select
> General, in 'Error Trapping' section it must be set 'Break in Class
Module'.

>   Hope it helps, Saeid



> > Hello,

> > I am developping a ActiveX component in Vb6 SP5 that uses a external
> > COM-class written in C++ .

> > In a function that uses this COM-Class and where I explicitly mention
"on
> > error goto" I still get an VB custom error handling message . The error
vb
> > throws , says that the error is in the procedure that calls the
> COM-function
> > ,  not the COM-function itself . The error infact is in the COM-function
,
> > because in many cases the function runs without errors .

> > Why does vb ignore my "On Error Goto" ?

> > Has anybody had the same problem ?

> > Hoping to hear from you .

> > Filip W.
> > C3



Sun, 07 Nov 2004 19:31:02 GMT  
 vb ignores "on error goto label"
Can you send your exact code you are using.

  Saeid


Quote:
> Hello,

> I have checked the settings, and these are allready set like you described
.

> Somebody any other suggestion ?

> Greeting,

> Filip W.


> > If you believe that error message is not in COM function I think you
have
> to
> > check Error trapping options, go to Tools menu and then Options and
select
> > General, in 'Error Trapping' section it must be set 'Break in Class
> Module'.

> >   Hope it helps, Saeid



> > > Hello,

> > > I am developping a ActiveX component in Vb6 SP5 that uses a external
> > > COM-class written in C++ .

> > > In a function that uses this COM-Class and where I explicitly mention
> "on
> > > error goto" I still get an VB custom error handling message . The
error
> vb
> > > throws , says that the error is in the procedure that calls the
> > COM-function
> > > ,  not the COM-function itself . The error infact is in the
COM-function
> ,
> > > because in many cases the function runs without errors .

> > > Why does vb ignore my "On Error Goto" ?

> > > Has anybody had the same problem ?

> > > Hoping to hear from you .

> > > Filip W.
> > > C3



Sun, 07 Nov 2004 20:30:06 GMT  
 vb ignores "on error goto label"
Hello,

I have found an article
(http://www.devx.com/premier/mgznarch/vbpj/1998/07jul98/bb0798.pdf) . That
explains the error .

When I compile in native code with , symbol option , then i get an
RPC_E_DISCONNECTED error at runtime , instead of a error "0".

Read a snippet below of the pdf article .

RPC_E_DISCONNECTED is another important HRESULT . That VB Runtime contains
an error handler that catches C++ exceptions , exceptions from
RasieException() and hardware faults . The error handler then raises VB
error 80010108 , which displays in the VB runtime error message box as "
Automation Error" .To Debug this error, identify the first exception and
where it came from .

I have traced the function , and have found the bug on 'Set lScriptEngine =
New CLIENTBINDINGLib.ScriptEngine' , the ScriptEngine is a custom programmed
C++ ComObject . So the problem is probably somewhere in the C++ code ,...

Nevertheless it's pretty stupid that the vb-error handler does not intercept
this error like it should .

We will debug the C++ code , ...

If anybody has any suggestions ... they are always welcome .

Greetings,

Filip W.


Quote:
> Can you send your exact code you are using.

>   Saeid



> > Hello,

> > I have checked the settings, and these are allready set like you
described
> .

> > Somebody any other suggestion ?

> > Greeting,

> > Filip W.


> > > If you believe that error message is not in COM function I think you
> have
> > to
> > > check Error trapping options, go to Tools menu and then Options and
> select
> > > General, in 'Error Trapping' section it must be set 'Break in Class
> > Module'.

> > >   Hope it helps, Saeid



> > > > Hello,

> > > > I am developping a ActiveX component in Vb6 SP5 that uses a external
> > > > COM-class written in C++ .

> > > > In a function that uses this COM-Class and where I explicitly
mention
> > "on
> > > > error goto" I still get an VB custom error handling message . The
> error
> > vb
> > > > throws , says that the error is in the procedure that calls the
> > > COM-function
> > > > ,  not the COM-function itself . The error infact is in the
> COM-function
> > ,
> > > > because in many cases the function runs without errors .

> > > > Why does vb ignore my "On Error Goto" ?

> > > > Has anybody had the same problem ?

> > > > Hoping to hear from you .

> > > > Filip W.
> > > > C3



Tue, 09 Nov 2004 15:52:13 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. vb ignores "on error goto label"

2. "On Error Goto ....." Stopped Working

3. vbscript code for "goto bookmark"???

4. Please ignore last posting: "hello world"

5. Ignoring the "Windows" Task Bar Key

6. Please ignore "Text on Gradient Fill"

7. How to write "On Error GoTo label"

8. When does "On Error GoTo <label>" not work?

9. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

10. "Mail Label" Report

11. VB Scripting Question -- "On Error"

12. "No Resume" Error in VB

 

 
Powered by phpBB® Forum Software