15.4.4 Stream State and Exceptions
Exception handling was introduced to C++ for the handling of errors and exceptions (see Section 4.3,
page 41). However, this was done after streams were already in wide use. To stay backward compatible,
by default, streams throw no exceptions. However, for the standardized streams, it is possible
to define, for every state flag, whether setting that flag will trigger an exception. This definition is
done by the exceptions() member function (Table 15.6).