Error Handling

Introduction

When you create an application, there are certain unknown elements. For example, if the users tries to save the current file which is on a floppy, and the floppy is not inserted when your application attempts to access it, your application will crash and you would lose any unsaved information. Error handling intercepts these errors, so you can give the user a useful error message, instead of your application crashing. i.e. instead of getting a message "Err 45 Disk not ready" and then the application crashing, you could change your code so that the user would get the message "Please insert a floppy disk into Drive A", and then give the user an option to retry or cancel.

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.” - Donald Knuth