Last post Sep 10, 2009 12:21 AM by Mc.Gem
Sep 09, 2009 11:44 PM|Mc.Gem|LINK
Im havin a code todo some attendance calculation for abt all the employees in my office.its an automatic pgm which will run at 7 am everyday and email the attendance list before 8am .
if theres any error for one particular employee, pgm execution stops and cant continue.since its an automatic pgm i want pgm to run with next employee if the current employee calculation got some pblm.
if i use on error resumenext statment if error occur at 11 thline of calculation, pgm still cont to 12th line and executing normal.i dun want it to be lik that.if the error is in 11th line then i want to stop execution of that particular employee and goto
next employee....how to do this?
Sep 10, 2009 12:12 AM|vik20000in|LINK
put a try catch block inside the main loop(inside the for loop), where you are looping all the employee. In case of any exception, log the exception. This way in case of exception for any one employee, will not hurt the loop for all employee and the calculation
for other employee's will continue.
Sep 10, 2009 12:21 AM|Mc.Gem|LINK
Thanks vikram.im havin try catch.....jus for on error i commented those line.....
could u give me eg for how to log the exception.?