Murach's C++ 2008
How to handle exceptions and validate data

First, this chapter shows you how to use structured exception handling so you can create bulletproof applications. Then, it shows you the best ways to validate the data that the user enters so exceptions are avoided. Frankly, this is the best material on data validation that we've ever seen.

Chapter 7 How to handle exceptions and validate data
An introduction to exceptions 172
How exceptions work 172
How to display a dialog box 174
How to use structured exception handling 176
How to catch an exception 176
How to use the properties and methods of an exception 178
How to catch specific types of exceptions 180
How to throw an exception 182
The Future Value application with exception handling 184
How to validate data 186
How to validate a single entry 186
How to use generic methods to validate an entry 188
How to validate multiple entries 190
The Future Value application with data validation 192
The dialog boxes 192
The code 192




Murach's C++ 2008

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.