Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Background
Error checking - anything from checking that the user has entered a valid respones to a question through to ensuring that a remote system you need to contact is available - is a vital part of any program. Sometimes, you can easily check things with a few if statements, but at other times it's much more practical to use an exception system where you call for a piece of code to be run, but then branch off to a particular handler is a certain condition is triggered.
Related technical and longer articles
errors v exceptions
Tips and short articles on this subject
Handling unusual and error conditions - exceptions
What are exceptions - Python based answer
The case for exceptions
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
C and C based languages module C236
Exceptions
Exercises, examples and other material relating to training module C236. This topic is presented on public courses Learning to program in C++, C++ for C Programmers, C and C++ Programming

Learning to program in C++ - a conversion course for programmers in other languages This intensive course teaches the C languages, and the C++ language ...
http://www.wellho.net/course/cffull.html  [course]
C and C++ Programming - a conversion course for programmers in other languages This intensive course teaches the C languages, and the C++ language which ...
http://www.wellho.net/course/cafull.html  [course]
C++ for C Programmers - Learn Object Orientation and the C++ language This course takes experienced C programmers and teaches them the extra skills of ...
http://www.wellho.net/course/cpfull.html  [course]
It s said that between a half and 95% of a program will be given over to error checking. Indeed some of the web based programs on this site are little ...
http://www.wellho.net/solutions/general- ... tions.html  [longer article]
#include using namespace std; /* */ int main () { string demo ; cout > demo; try { demo.erase(10,10); ...
http://www.wellho.net/resources/ex.php4?item=c236/except.cpp  [code sample]
How do you check for run time errors in your program? You'll include tests with if statements in almost every program you write, to ensure that user ...
http://www.wellho.net/mouth/1875_Wha ... nswer.html  [short article]
When you run a program, things can go wrong - run time errors. And no amount of coding by the programmer can prevent these things - it •[99]s ...
http://www.wellho.net/mouth/799_The- ... tions.html  [short article]

Error checking - anything from checking that the user has entered a valid respones to a question through to ensuring that a remote system you need to contact is available - is a vital part of any program. Sometimes, you can easily check things with a few if statements, but at other times it's much more practical to use an exception system where you call for a piece of code to be run, but then branch off to a particular handler is a certain condition is triggered.

This topic is presented on public courses Learning to program in C++, C++ for C Programmers, C and C++ Programming

Examples from our training material
except.cpp   Exception handling - catches
levels.cpp   Exceptions - try, catch yourself AND throw to parent too
makefile   Compile / Load instructions for examples in this module
prob.cpp   Exception handling - why we need it
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
What are exceptions?
Try and catch.
Exception heirarcy.
Accessing exception data.
Throwing your own exceptions.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2010: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 344596 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho