Link to home
Start Free TrialLog in
Avatar of TommyTwoPints
TommyTwoPintsFlag for Thailand

asked on

Try and catch problem

Hi Experts,

I have an issue with try and catch and was wondering if there was any way around it

In my form code on all the top level commands i have

Try
'Call
Catch ex as exception
'Error Code
End try

Most of the calls load another form and will run through alot of routines but it still all leads back to the first call in the form code. Why arent my errors handled by this?

Cheers,

Tom
SOLUTION
Avatar of Manish Chhetia
Manish Chhetia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,
  In the called form you might have handled all the exceptions(using try catch and might not have used throw in the catch block).If you want to handle the exceptions here you need to throw the exception in the called forms catch code.

Thanks,
Nanda
Avatar of TommyTwoPints

ASKER

So basically what you are saying;

Use try and catch again for the commands on the called forms.

Is this right?
The reason i asked this is because i had Try and catch code in the top level routine in another application. If any error occured in any of the lower level routines it was handled by the catch in the first routine.
Avatar of pradeepsudharsan
pradeepsudharsan

Hi,
yes ,you have to use try and catch again for the commands on the called forms.


Regads
pradeep
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial