| | |
how to make error handling
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
you can use err object. this object was built in vb.net.
i will give a simple code for u
try this following code :
you can use err.clear to clear every err object property
err.source to show object name or application which error provides.
Ok.
all for the best
i will give a simple code for u
try this following code :
VB.NET Syntax (Toggle Plain Text)
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 errHandling: 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 msgbox(ErrMsg) 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.
Ok.
all for the best
![]() |
Similar Threads
- How do I make a GUI in C++ (C++)
- Send data on a serial port (C++)
- Error handling (PHP)
- A multilingual coded Hello World! thread (Legacy and Other Languages)
- Div/0 Error (Visual Basic 4 / 5 / 6)
- How to be Crash Free (C++)
- Need help with DirectX code (C)
Other Threads in the VB.NET Forum
- Previous Thread: Text Boxes
- Next Thread: load data in combobox
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array arrays basic bing button buttons c# center check checkbox code convert crystalreport data database datagrid datagridview date dissertation dissertations dropdownlist excel fade file-dialog filter ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output panel passingparameters picturebox picturebox1 port position print printing problem project read remove save searchbox searchvb.net select serial server shutdown soap sorting survey table tcp temperature text textbox timer timespan toolbox trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year






