hi all,

i want to make error handling but a complete ones. i was done with exception (ex) but i need a little bit more like error line,error number or other. does any one know how to do this?

best regards.

you can use err object. this object was built in vb.net.
i will give a simple code for u
try this following code :

sub main()
10:       on error goto errHandling
20:       dim a as integer = 2
30:       dim b as integer = 7
40:       dim c as integer
50:       z = x / y
60:       console.writeline("Value of c : " & c)
70:       exit sub
                 dim ErrMsg as string
                 ErrMsg = "Error Number = " & err.number
                 ErrMsg = chr(13)
                 ErrMsg = "Error Description = " & err.Description
                 ErrMsg = chr(13)
                 ErrMsg = "Erorr Line = " & err.erl
                 resume next
end sub

you can use err.clear to clear every err object property
err.source to show object name or application which error provides.

all for the best

commented: Perfectly +1
commented: Thx buddy +1
commented: not understand :( +1

hi jx_man
thx for your fast reply, it run goods and helps.