Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

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
Exercises, examples and other material relating to training module C236. This topic is presented on public courses Learning to program in C and C++, C++ for C Programmers, C and C++ Programming, Learning to program in C and C++, C and C++ Programming

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

Articles and tips on this subjectupdated
3509Operator Overloading, Exceptions, Pointers, References and Templates in C++ - new examples from our courses
I've added three new C++ examples to our library following on from last week's C++ course. Each of them is one step beyond "hello world" with regard to the particular feature it's showing, but isn't so advanced and showing so many options that it confuses the newcomer - at least that's the theory. ...
3068Throwing your own exception in C++, and catching it
In C++ you can throw anything - it doesn't have to be something "throw-able" as in Java. 1. Create a class of objects that you want to throw in exceptional circumstances 2. When you want to throw an exception, use the throw keyword and pass in the object 3. Call the code that you want to catch the ...
2622Handling unusual and error conditions - exceptions
"I can't answer that question in the way you expect" ... that's something that may be said to you occasionally - you ask someone what suit a playing card is that they're holding and they cannot tell you because it is a joker, or you ask what number is written on a piece of paper when the paper is blank. The ...
1875What are exceptions - Python based answer
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 entered data is reasonable / as you would expect ... but you will also need to do more that that. You'll need to check whether a system function has run ...
799The case for exceptions
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’s a user entering a string of text when a number’s required, a needed file having been deleted, or a network connection that’s broken that causes ...
Examples from our training material
CppExcept.cpp   Creating exception objects, throwing and catching them
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
microthrow.cpp   Defining, throwing, catching an excpetion
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 [here].
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 Ruby, Lua, 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.

You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/C236.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb