How to raise an error in ActiveX DLL 
Author Message
 How to raise an error in ActiveX DLL

Can someone explain to me how to raise a trapable error from my DLL?

I have classes with properties.  On a Let property, I want to verify the
data and send an error back to the .exe if the data was invalid.

Thanks for a any help.

Gary



Wed, 14 Jul 2004 00:07:59 GMT  
 How to raise an error in ActiveX DLL
Err.Raise should do it. (If you have an error handler in the let sub, it
will trap the error, and you will need to raise the error again)


Can someone explain to me how to raise a trapable error from my DLL?

I have classes with properties.  On a Let property, I want to verify the
data and send an error back to the .exe if the data was invalid.

Thanks for a any help.

Gary



Wed, 14 Jul 2004 07:29:42 GMT  
 How to raise an error in ActiveX DLL
Thanks, I figured that out after I wrote this..maybe you can answer another
question.  I find that this will only work at run time...and not at design
time.  Is this correct?  At design time, the err.raise will actually throw
up an error dialog box.  I suppose there isn't any way to get this to work
at design time.

Thanks for your help.

Gary


Quote:
> Err.Raise should do it. (If you have an error handler in the let sub, it
> will trap the error, and you will need to raise the error again)



> Can someone explain to me how to raise a trapable error from my DLL?

> I have classes with properties.  On a Let property, I want to verify the
> data and send an error back to the .exe if the data was invalid.

> Thanks for a any help.

> Gary



Wed, 14 Jul 2004 12:32:16 GMT  
 How to raise an error in ActiveX DLL
Do this at VB IDE:

Menu Tools --> Options --> General Tab --> Error Traping --> BREAK ON
UNHANDLED ERRORS

make this and test again, you can raise the error on the IDE.

Thanks,
Rodrigo


Quote:
> Thanks, I figured that out after I wrote this..maybe you can answer
another
> question.  I find that this will only work at run time...and not at design
> time.  Is this correct?  At design time, the err.raise will actually throw
> up an error dialog box.  I suppose there isn't any way to get this to work
> at design time.

> Thanks for your help.

> Gary



> > Err.Raise should do it. (If you have an error handler in the let sub, it
> > will trap the error, and you will need to raise the error again)



> > Can someone explain to me how to raise a trapable error from my DLL?

> > I have classes with properties.  On a Let property, I want to verify the
> > data and send an error back to the .exe if the data was invalid.

> > Thanks for a any help.

> > Gary



Wed, 14 Jul 2004 22:43:34 GMT  
 How to raise an error in ActiveX DLL
Thank you...that worked great.

You've all been most helpful. :)

Gary


Quote:
> Do this at VB IDE:

> Menu Tools --> Options --> General Tab --> Error Traping --> BREAK ON
> UNHANDLED ERRORS

> make this and test again, you can raise the error on the IDE.

> Thanks,
> Rodrigo



> > Thanks, I figured that out after I wrote this..maybe you can answer
> another
> > question.  I find that this will only work at run time...and not at
design
> > time.  Is this correct?  At design time, the err.raise will actually
throw
> > up an error dialog box.  I suppose there isn't any way to get this to
work
> > at design time.

> > Thanks for your help.

> > Gary



> > > Err.Raise should do it. (If you have an error handler in the let sub,
it
> > > will trap the error, and you will need to raise the error again)



> > > Can someone explain to me how to raise a trapable error from my DLL?

> > > I have classes with properties.  On a Let property, I want to verify
the
> > > data and send an error back to the .exe if the data was invalid.

> > > Thanks for a any help.

> > > Gary



Thu, 15 Jul 2004 03:16:05 GMT  
 How to raise an error in ActiveX DLL
How should I go about this errors ?
It just kill all call stack in class (DLL) and return error to calling app.
What if I want to continue?
Like skip or something?


Quote:
> Do this at VB IDE:

> Menu Tools --> Options --> General Tab --> Error Traping --> BREAK ON
> UNHANDLED ERRORS

> make this and test again, you can raise the error on the IDE.

> Thanks,
> Rodrigo



> > Thanks, I figured that out after I wrote this..maybe you can answer
> another
> > question.  I find that this will only work at run time...and not at
design
> > time.  Is this correct?  At design time, the err.raise will actually
throw
> > up an error dialog box.  I suppose there isn't any way to get this to
work
> > at design time.

> > Thanks for your help.

> > Gary



> > > Err.Raise should do it. (If you have an error handler in the let sub,
it
> > > will trap the error, and you will need to raise the error again)



> > > Can someone explain to me how to raise a trapable error from my DLL?

> > > I have classes with properties.  On a Let property, I want to verify
the
> > > data and send an error back to the .exe if the data was invalid.

> > > Thanks for a any help.

> > > Gary



Sat, 17 Jul 2004 23:41:34 GMT  
 How to raise an error in ActiveX DLL
You need to trap the error at the application level with an

On Error Goto ErrorHandler

or something.

Then at the bottom of the module have an

ErrorHandler:

After the error handler, you can put your code to handle the error, or
nothing if you wish to ignore it.  But I'd assume you want to do something
with it since you raised it in the first place.

Gary


Quote:
> How should I go about this errors ?
> It just kill all call stack in class (DLL) and return error to calling
app.
> What if I want to continue?
> Like skip or something?



> > Do this at VB IDE:

> > Menu Tools --> Options --> General Tab --> Error Traping --> BREAK ON
> > UNHANDLED ERRORS

> > make this and test again, you can raise the error on the IDE.

> > Thanks,
> > Rodrigo



> > > Thanks, I figured that out after I wrote this..maybe you can answer
> > another
> > > question.  I find that this will only work at run time...and not at
> design
> > > time.  Is this correct?  At design time, the err.raise will actually
> throw
> > > up an error dialog box.  I suppose there isn't any way to get this to
> work
> > > at design time.

> > > Thanks for your help.

> > > Gary



> > > > Err.Raise should do it. (If you have an error handler in the let
sub,
> it
> > > > will trap the error, and you will need to raise the error again)



> > > > Can someone explain to me how to raise a trapable error from my DLL?

> > > > I have classes with properties.  On a Let property, I want to verify
> the
> > > > data and send an error back to the .exe if the data was invalid.

> > > > Thanks for a any help.

> > > > Gary



Mon, 19 Jul 2004 02:19:57 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. ActiveX DLL and Raising Errors

2. Raising Errors in VB6 ActiveX DLL

3. Raising errors from ActiveX dll

4. Help needed raising events from ActiveX DLL

5. raise an event from a form of an ActiveX dll

6. Help needed raising events from ActiveX DLL

7. raising event from form in ActiveX dll

8. Err.Raise in OLE Server EXE not raising error in calling program

9. Err.Raise - error not being re-raised all the way to top of the call stack

10. Active connection occurs problem (asp, vb dll , Oracle) but no error message to be raised

11. Raising errors from classes in DLL

12. Raising errors from C DLL

 

 
Powered by phpBB® Forum Software