August 2003
Intermediate to advanced
624 pages
15h 3m
English
As might be expected, error handling is a bit different in C++ than it is in Java. A lot of this is due to basic differences between the languages. The Java class libraries natively use exceptions extensively, for everything from I/O problems to, in our programs, SAX exceptions. C++, on the other hand, while it does provide a facility for declaring, throwing, and catching exceptions, does not by default use them very much. The standard C++ class libraries usually set error flags instead of throwing exceptions. As a consequence, I generally will not make much use of exceptions in the C++ code. The only exception to this is in the main routines, and that is due to COM. Since MSXML is a COM object, we can throw COM exceptions. However ...