tmp/tmpy2ik_8_t/{from.md → to.md}
RENAMED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
##### Class `ios_base::failure` <a id="ios::failure">[[ios::failure]]</a>
|
| 2 |
-
|
| 3 |
-
``` cpp
|
| 4 |
-
namespace std {
|
| 5 |
-
class ios_base::failure : public system_error {
|
| 6 |
-
public:
|
| 7 |
-
explicit failure(const string& msg, const error_code& ec = io_errc::stream);
|
| 8 |
-
explicit failure(const char* msg, const error_code& ec = io_errc::stream);
|
| 9 |
-
};
|
| 10 |
-
}
|
| 11 |
-
```
|
| 12 |
-
|
| 13 |
-
An implementation is permitted to define `ios_base::failure` as a
|
| 14 |
-
synonym for a class with equivalent functionality to class
|
| 15 |
-
`ios_base::failure` shown in this subclause.
|
| 16 |
-
|
| 17 |
-
[*Note 1*: When `ios_base::failure` is a synonym for another type it
|
| 18 |
-
shall provide a nested type `failure`, to emulate the injected class
|
| 19 |
-
name. — *end note*]
|
| 20 |
-
|
| 21 |
-
The class `failure` defines the base class for the types of all objects
|
| 22 |
-
thrown as exceptions, by functions in the iostreams library, to report
|
| 23 |
-
errors detected during stream buffer operations.
|
| 24 |
-
|
| 25 |
-
When throwing `ios_base::failure` exceptions, implementations should
|
| 26 |
-
provide values of `ec` that identify the specific reason for the
|
| 27 |
-
failure.
|
| 28 |
-
|
| 29 |
-
[*Note 2*: Errors arising from the operating system would typically be
|
| 30 |
-
reported as `system_category()` errors with an error value of the error
|
| 31 |
-
number reported by the operating system. Errors arising from within the
|
| 32 |
-
stream library would typically be reported as
|
| 33 |
-
`error_code(io_errc::stream,
|
| 34 |
-
iostream_category())`. — *end note*]
|
| 35 |
-
|
| 36 |
-
``` cpp
|
| 37 |
-
explicit failure(const string& msg, const error_code& ec = io_errc::stream);
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
*Effects:* Constructs an object of class `failure` by constructing the
|
| 41 |
-
base class with `msg` and `ec`.
|
| 42 |
-
|
| 43 |
-
``` cpp
|
| 44 |
-
explicit failure(const char* msg, const error_code& ec = io_errc::stream);
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
*Effects:* Constructs an object of class `failure` by constructing the
|
| 48 |
-
base class with `msg` and `ec`.
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|