tmp/tmp98hzvb_b/{from.md → to.md}
RENAMED
|
@@ -3,27 +3,25 @@
|
|
| 3 |
The class `system_error` describes an exception object used to report
|
| 4 |
error conditions that have an associated error code. Such error
|
| 5 |
conditions typically originate from the operating system or other
|
| 6 |
low-level application program interfaces.
|
| 7 |
|
| 8 |
-
If an error represents an out-of-memory condition,
|
| 9 |
-
encouraged to throw an exception object of type
|
| 10 |
-
[[bad.alloc]] rather than `system_error`.
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
namespace std {
|
| 14 |
class system_error : public runtime_error {
|
| 15 |
public:
|
| 16 |
system_error(error_code ec, const string& what_arg);
|
| 17 |
system_error(error_code ec, const char* what_arg);
|
| 18 |
system_error(error_code ec);
|
| 19 |
-
system_error(int ev, const error_category& ecat,
|
| 20 |
-
|
| 21 |
-
system_error(int ev, const error_category& ecat,
|
| 22 |
-
const char* what_arg);
|
| 23 |
system_error(int ev, const error_category& ecat);
|
| 24 |
const error_code& code() const noexcept;
|
| 25 |
-
const char* what() const noexcept;
|
| 26 |
};
|
| 27 |
-
}
|
| 28 |
```
|
| 29 |
|
|
|
|
| 3 |
The class `system_error` describes an exception object used to report
|
| 4 |
error conditions that have an associated error code. Such error
|
| 5 |
conditions typically originate from the operating system or other
|
| 6 |
low-level application program interfaces.
|
| 7 |
|
| 8 |
+
[*Note 1*: If an error represents an out-of-memory condition,
|
| 9 |
+
implementations are encouraged to throw an exception object of type
|
| 10 |
+
`bad_alloc` ([[bad.alloc]]) rather than `system_error`. — *end note*]
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
namespace std {
|
| 14 |
class system_error : public runtime_error {
|
| 15 |
public:
|
| 16 |
system_error(error_code ec, const string& what_arg);
|
| 17 |
system_error(error_code ec, const char* what_arg);
|
| 18 |
system_error(error_code ec);
|
| 19 |
+
system_error(int ev, const error_category& ecat, const string& what_arg);
|
| 20 |
+
system_error(int ev, const error_category& ecat, const char* what_arg);
|
|
|
|
|
|
|
| 21 |
system_error(int ev, const error_category& ecat);
|
| 22 |
const error_code& code() const noexcept;
|
| 23 |
+
const char* what() const noexcept override;
|
| 24 |
};
|
| 25 |
+
}
|
| 26 |
```
|
| 27 |
|