drinkmystery / mili

Automatically exported from code.google.com/p/mili
Boost Software License 1.0
0 stars 0 forks source link

Add error checking in streams-utils #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add some sort of error checking for Stream-Utils.

Original issue reported on code.google.com by danielgutson@gmail.com on 9 Jun 2009 at 5:07

GoogleCodeExporter commented 9 years ago
pls reassign.

Original comment by danielgutson@gmail.com on 31 Dec 2011 at 11:27

GoogleCodeExporter commented 9 years ago
By error checking I mean:
  - When not using exceptions: after using the stream with the library, if there was an error, the stream should remain flagged accordingly
  - when using exceptions: errors should cause exception throwing.

Probably this behavior is already working. Pls check.

Both cases should be tested by unit tests.

Original comment by danielgutson@gmail.com on 31 Dec 2011 at 11:44

GoogleCodeExporter commented 9 years ago

Original comment by hugo.arregui on 2 Jan 2012 at 3:31

GoogleCodeExporter commented 9 years ago
An example of the non-exceptions case:

vector<T> v;
ifstream f;

if (!(f >> v))    // here
{
   cerr << ...;
}

Original comment by danielgutson@gmail.com on 2 Jan 2012 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by daniel.g...@fudepan.org.ar on 2 Jan 2012 at 3:39

GoogleCodeExporter commented 9 years ago
As it was thought such behavior is already working. Few unit tests were added 
to check that works as expected.

Original comment by matias.t...@gmail.com on 23 Feb 2012 at 9:21