473,734 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"on error goto" or "try catch"

Hi,

As a former VB-programmer I'm used to the "on error goto"-errorhandling. I
see that in actually all the VB.NET-samples I can fin people use the "Try -
catch"-errorhandling.

Which of the two is the best? Are there good reasons to use the Try-Catch?
Will the "on error goto" disapear in the future? Are there any logical
reasons to use trey-catch? Is it 'better' programming? etc etc :-)

I'm jsut more comfortable with the "on error goto", mostly because I'm used
to it I guess. Any help or reflectiosn regarding this subject would be nice!

Thanks in advance!
Nov 20 '05
20 3621
DraguVaso,
I just noticed this article published on MSDN.

http://msdn.microsoft.com/vbasic/def...orhandling.asp

Hope this helps
Jay

"DraguVaso" <pi**********@h otmail.com> wrote in message
news:3f******** **************@ reader0.news.sk ynet.be...
Hi,

As a former VB-programmer I'm used to the "on error goto"-errorhandling. I
see that in actually all the VB.NET-samples I can fin people use the "Try - catch"-errorhandling.

Which of the two is the best? Are there good reasons to use the Try-Catch?
Will the "on error goto" disapear in the future? Are there any logical
reasons to use trey-catch? Is it 'better' programming? etc etc :-)

I'm jsut more comfortable with the "on error goto", mostly because I'm used to it I guess. Any help or reflectiosn regarding this subject would be nice!
Thanks in advance!

Nov 20 '05 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3890
by: Meya | last post by:
Hi, when I hit my http://<domain name> site,I am getting this error msg: I have also installed my SSL cert on the IIS 5.0 ******************************** The page must be viewed over a secure channel Please try the following:
40
3038
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the goodness of Python whenever I talk with fellow developers, but I always hit a snag when it comes to discussing the finer points of the execution model (specifically, exceptions). Without fail, when I start talking with some of the "old-timers"...
9
1966
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual Basic .Net application. I have researched MSDN for help and found the example article 321900 (see below) and set up a test and everything works fine when I use SQL Server 2000 but when I modify the code and use data from Access 2000 using an...
1
2744
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
6
4453
by: bill salkin | last post by:
I setup a "Try..." block and attempted to open a non- existant database. It went to the second "catch" not the first. What is the proper "catch" clause for this specific case? TIA, Bill
1
2773
by: pbd22 | last post by:
hi. for some reason i am not able to navigate the dom. i keep getting the 'no properties' error but i think i am doing everything right. this is an XML response from an AJAX call. The ajax method to call the server code looks like this. i am passing a cookie as a parameter:
11
47999
by: Maxwell2006 | last post by:
Hi, I know that this is not a good practice, but I wonder do we have "on error resume next" in C#? Thanks,
7
2421
by: dick | last post by:
in the "try{throw}catch" structure, how the C++ code return the "type" thrown by a function?
0
5681
by: Ismail Fatih Yýldýrým | last post by:
I modified the RSACSPSample from MSDN to try out a simple commutative encryption model using RSA encryption but when i run the progrem the first encryption command works but during the second encryption command (line : encryptedData2 = RSAE...) i get a "Key not valid for use in specified state." exception error even though i provide a valid second key to encrypt it. How can i overcome this error and get double encryption to work ? The...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.