Err.Raise() compiled vs ide ? 
Author Message
 Err.Raise() compiled vs ide ?

Hi,
   I am using err.raise in a class method to send the error up to the GUI
level of an app.  when the error raises in the ide during a run it is not
handled by my gui error handler and the app crashes. If I choose debug from
the error message, it brings me to the code in the class where I raise the
error.  But if I compile the app and run it  the gui handler works and the
app stays up.

does anyone know if I can fix this so that  the GUI handler will work when I
am testing in run mode?

thanks a lot,
sean



Thu, 06 Sep 2001 03:00:00 GMT  
 Err.Raise() compiled vs ide ?
Check Tools | Options | General

It's in the Error Handling options, try 'Break on Unhandled Errors '. From
the help file:

---Error Trapping

Determines how errors are handled in the Visual Basic development
environment and sets the default state of error trapping for all subsequent
instances of Visual Basic. To set the error trapping option for only the
current session of Visual Basic without changing the default for future
sessions, use the Toggle command on the Code window's shortcut menu.

Break on All Errors Any error causes the project to enter break mode,
whether or not an error handler is active and whether or not the code is in
a class module.

Break in Class Module Any unhandled error produced in a class module
causes the project to enter break mode at the line of code in the class
module which produced the error.
When you debug an ActiveX component project by running an ActiveX client
test program in another project, set this option in the ActiveX component
project to break on errors in its class modules, instead of always returning
the error to the client test program.

Break on Unhandled Errors If an error handler is active, the error is
trapped without entering break mode. If there is no active error handler,
the error causes the project to enter break mode. An unhandled error in a
class module, however, causes the project to enter break mode on the line of
code that invoked the offending procedure of the class.

Quote:

>Hi,
>   I am using err.raise in a class method to send the error up to the GUI
>level of an app.  when the error raises in the ide during a run it is not
>handled by my gui error handler and the app crashes. If I choose debug from
>the error message, it brings me to the code in the class where I raise the
>error.  But if I compile the app and run it  the gui handler works and the
>app stays up.

>does anyone know if I can fix this so that  the GUI handler will work when
I
>am testing in run mode?

>thanks a lot,
>sean



Thu, 06 Sep 2001 03:00:00 GMT  
 Err.Raise() compiled vs ide ?
As I was in a Zenlike state in comp.lang.basic.visual.misc, "Sean

placid waters of a pond:

Quote:
>Hi,
>   I am using err.raise in a class method to send the error up to the GUI
>level of an app.  when the error raises in the ide during a run it is not
>handled by my gui error handler and the app crashes. If I choose debug from
>the error message, it brings me to the code in the class where I raise the
>error.  But if I compile the app and run it  the gui handler works and the
>app stays up.

>does anyone know if I can fix this so that  the GUI handler will work when I
>am testing in run mode?

In the VB IDE, go to Project->Options "Break on Unhandled Errors."

--Jekke
---
Web-based e-mail for Windows-based developers
http://www.optionexplicit.com



Thu, 06 Sep 2001 03:00:00 GMT  
 Err.Raise() compiled vs ide ?
Sean,

Press Alt-F8 to step past the error.

Matthew



Quote:
> Hi,
>    I am using err.raise in a class method to send the error up to the GUI
> level of an app.  when the error raises in the ide during a run it is not
> handled by my gui error handler and the app crashes. If I choose debug
from
> the error message, it brings me to the code in the class where I raise
the
> error.  But if I compile the app and run it  the gui handler works and
the
> app stays up.

> does anyone know if I can fix this so that  the GUI handler will work
when I
> am testing in run mode?

> thanks a lot,
> sean



Fri, 07 Sep 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

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

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

3. IDE vs. compiled

4. Stack Offsets in IDE vs Compiled

5. ADO in VB IDE vs Compiled

6. Err.Raise Causes Automation Error

7. Raising Err in Class Module

8. Err.Raise Number starting point

9. err.raise not trappable in class module

10. Err.Raise causes Error

11. Question! Err.raise

12. Problems when using Err.Raise in a public method of an activex

 

 
Powered by phpBB® Forum Software