How To Clear Exception Mask

When creating an exception mask for a file, should an exception throw during a file operation, I can reset the state bits of the actual file using ios::clear().

Though after doing so, will the exception mask still throw an exception, thinking that the specified error state flags are still set to true? If so, how can I reset the exception mask so that it is ready to throw more exceptions should the appropriate situations arise in the future?
Last edited on
See this:

http://www.cplusplus.com/reference/ios/ios/clear/

The error is cleared. The next stream operation will set the error if necessary.
Like I said, I'm aware that ios::clear() clears the state bits of the file. My question is regarding the exception mask for the relative object.

Nothing in the documentation for ios::exceptions does it say that the exception mask will/will not continue to throw exceptions after one of the specified error state flags go off.
My question is:
Should the exception mask of throw an exception, and the error flags of the relative file be reset through the use of ios::clear(), will the exception mask still throw exceptions? If so, is there a way to reset it?
Topic archived. No new replies allowed.