
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