Prev: Put some RTFs in a printing document
Next: marvendas@gmail.com Kit completo deSolenóides ( solenoid ) + chicote Para Câmbio automatico 01M hidramatico Audi A3 Vw Golf gti turbo 41269
From: Stickybit on 19 Feb 2010 08:36 Hi guys and gals I'm having a wierd problem with my application. I'm calling a few functions and subs from my main load event, and everything works just fine - except when one of functions throws an exception (which is handled by the function itself). When an exception has ocured (and been handled) in one of the functions, and the rest of the code, in the main load event should run - northing happens. It's like the rest of the load event just had been completely forgotten. What could be the problem here? Regards Søren Schimkat
From: Patrice on 19 Feb 2010 12:27 Hi, If not done, a first step could be to throw a dummy exception and step into your code to see what is the code flow... If you don't see what happens seeing some code (we just need 10 lines of code that would repro the problem, not your whole code) and knowing which exception you get could help to diagnose the problem. During this step it is likely you'll find the problem or you'll have something simple to show. -- Patrice "Stickybit" <Stickybit(a)discussions.microsoft.com> a �crit dans le message de groupe de discussion : C93A85B6-1D38-4904-A27C-2E141DAE2023(a)microsoft.com... > Hi guys and gals > > I'm having a wierd problem with my application. I'm calling a few > functions > and subs from my main load event, and everything works just fine - except > when one of functions throws an exception (which is handled by the > function > itself). > > When an exception has ocured (and been handled) in one of the functions, > and > the rest of the code, in the main load event should run - northing > happens. > It's like the rest of the load event just had been completely forgotten. > > What could be the problem here? > > Regards S�ren Schimkat
From: Family Tree Mike on 19 Feb 2010 12:29
"Stickybit" wrote: > Hi guys and gals > > I'm having a wierd problem with my application. I'm calling a few functions > and subs from my main load event, and everything works just fine - except > when one of functions throws an exception (which is handled by the function > itself). > > When an exception has ocured (and been handled) in one of the functions, and > the rest of the code, in the main load event should run - northing happens. > It's like the rest of the load event just had been completely forgotten. > > What could be the problem here? > > Regards Søren Schimkat Can you provide a small example that fails? If I understand your point, the code below should not set the label to "Success!!", but it does. So this code is not doing the same as yours. Public Class Form1 Sub ExceptionalRoutine() Throw New Exception("Whoopee!") End Sub Sub YogiBerra() Try ExceptionalRoutine() Catch ex as Exception MessageBox.Show("Caught exception...") End Try End Sub Private Sub Form1_Load _ (ByVal sender as Object, ByVal e as System.EventArgs) _ Handles Me.Load YogiBerra() Label1.Text = "Success!" End Sub End Class |