diff options
Diffstat (limited to 'examples/roundtrip/driver.cxx')
-rw-r--r-- | examples/roundtrip/driver.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/roundtrip/driver.cxx b/examples/roundtrip/driver.cxx index 7c95538..b83988b 100644 --- a/examples/roundtrip/driver.cxx +++ b/examples/roundtrip/driver.cxx @@ -22,6 +22,9 @@ main (int argc, char* argv[]) try { + // Enable stream exceptions so that io failures are reported + // as stream rather than as parsing exceptions. + // ifstream ifs; ifs.exceptions (ifstream::badbit | ifstream::failbit); ifs.open (argv[1], ifstream::in | ifstream::binary); |