Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.Net: Quitting execution without exiting form

Posted on 2014-01-28
4
Medium Priority
?
285 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 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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