Solved

VB.Net: Quitting execution without exiting form

Posted on 2014-01-28
4
282 Views
Last Modified: 2014-01-28
I have a VB.Net application with a deeply embedded routine: about five layers in on the call stack.  If a particular exception occurs at this level, I want to stop execution but keep the form running.  A simple "End" command stops execution and unloads the form; and "Exit Function" takes me out of the offending routine, but it's still operating within a larger loop from which I wish to exit in order to send control back to the form.  I did achieve my objective, creating a ByRef string within my function to provide feedback to the calling program, progressively working to the bottom of the call stack, and exiting cleanly.  I'm looking for an "Exit" command that obviates the need for taking the exotic measures I had to take to dig myself out from the deep hole in which I was.  Does such a command exist?  Thanks, ~Peter Ferber
0
Comment
Question by:PeterFrb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 23

Accepted Solution

by:
Jens Fiederer earned 500 total points
ID: 39815553
A "throw" will take you up to the nearest level that catches it.
0
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39815558
0
 

Author Closing Comment

by:PeterFrb
ID: 39815609
Indeed, exactly what I needed.  I come from the VBA and VB6 world, and I appreciate learning the nuances of the .Net world.  Thank you.  ~Peter
0
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39815842
My pleasure.  Welcome to .NET!
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question