tmp/tmpmygovuc1/{from.md → to.md}
RENAMED
|
@@ -6,20 +6,20 @@ shall be thrown if any of the function’s error conditions is detected or
|
|
| 6 |
a call to an operating system or other underlying API results in an
|
| 7 |
error that prevents the library function from meeting its
|
| 8 |
specifications. Failure to allocate storage shall be reported as
|
| 9 |
described in [[res.on.exception.handling]].
|
| 10 |
|
| 11 |
-
Consider a function in this clause that is specified to
|
| 12 |
-
of type `system_error` and specifies error conditions
|
| 13 |
-
`operation_not_permitted` for a thread that does not have
|
| 14 |
-
to perform the operation. Assume that, during the
|
| 15 |
-
function, an `errno` of `EPERM` is reported by a POSIX
|
| 16 |
-
the implementation. Since POSIX specifies an `errno` of
|
| 17 |
-
“the caller does not have the privilege to perform the
|
| 18 |
-
implementation maps `EPERM` to an `error_condition` of
|
| 19 |
`operation_not_permitted` ([[syserr]]) and an exception of type
|
| 20 |
-
`system_error` is thrown.
|
| 21 |
|
| 22 |
The `error_code` reported by such an exception’s `code()` member
|
| 23 |
function shall compare equal to one of the conditions specified in the
|
| 24 |
function’s error condition element.
|
| 25 |
|
|
|
|
| 6 |
a call to an operating system or other underlying API results in an
|
| 7 |
error that prevents the library function from meeting its
|
| 8 |
specifications. Failure to allocate storage shall be reported as
|
| 9 |
described in [[res.on.exception.handling]].
|
| 10 |
|
| 11 |
+
[*Example 1*: Consider a function in this clause that is specified to
|
| 12 |
+
throw exceptions of type `system_error` and specifies error conditions
|
| 13 |
+
that include `operation_not_permitted` for a thread that does not have
|
| 14 |
+
the privilege to perform the operation. Assume that, during the
|
| 15 |
+
execution of this function, an `errno` of `EPERM` is reported by a POSIX
|
| 16 |
+
API call used by the implementation. Since POSIX specifies an `errno` of
|
| 17 |
+
`EPERM` when “the caller does not have the privilege to perform the
|
| 18 |
+
operation”, the implementation maps `EPERM` to an `error_condition` of
|
| 19 |
`operation_not_permitted` ([[syserr]]) and an exception of type
|
| 20 |
+
`system_error` is thrown. — *end example*]
|
| 21 |
|
| 22 |
The `error_code` reported by such an exception’s `code()` member
|
| 23 |
function shall compare equal to one of the conditions specified in the
|
| 24 |
function’s error condition element.
|
| 25 |
|