Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


HELP!


HELP!

Author
Message
Michael_qq
Michael_qq
Forum God
Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)Forum God (2.1K reputation)

Group: Forum Members
Posts: 11, Visits: 20
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
GO



Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search