Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.Net: Quitting execution without exiting form

Posted on 2014-01-28
4
Medium Priority
?
287 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
  • 3
4 Comments
 
LVL 23

Accepted Solution

by:
Jens Fiederer earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

885 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