Hi, I got a code which has a lot of bugs from others. I try to debug it. I need somebody teach me on how to use Err.Raise method.
The original code has the following structure:
private sub main() :::::: funct1() :::::: end sub
public sub funct1() :::: on error goto err_hdl01 :::: sub_routine3() :::: exit sub
err_hdl01: err_raise() exit sub
end sub
private sub err_raise() err.number = 12345 err.description = "abcdefg" err.source = "xyz" err.raise err.number, err.source, err.description end sub
My question is: if Sub_routine3 returns an error, funct1 will goto err_hdl01, then it will call err_raise() which will raise another error. where does the code return to?
if Sub_routine3 returns an error, will this code fall in a died loop?
Thank you for your advice in advance.
Michael_qq
|