tmp/tmp3wqcvg6a/{from.md → to.md}
RENAMED
|
@@ -5,20 +5,24 @@ throw-expression:
|
|
| 5 |
throw assignment-expressionₒₚₜ
|
| 6 |
```
|
| 7 |
|
| 8 |
A *throw-expression* is of type `void`.
|
| 9 |
|
| 10 |
-
|
| 11 |
-
[[except.throw]]
|
| 12 |
-
|
| 13 |
-
operand
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
A *throw-expression* with no operand rethrows the currently handled
|
| 17 |
-
exception [[except.handle]].
|
| 18 |
-
|
| 19 |
-
exception is
|
|
|
|
|
|
|
| 20 |
|
| 21 |
[*Example 1*:
|
| 22 |
|
| 23 |
An exception handler that cannot completely handle the exception itself
|
| 24 |
can be written like this:
|
|
@@ -32,9 +36,5 @@ try {
|
|
| 32 |
}
|
| 33 |
```
|
| 34 |
|
| 35 |
— *end example*]
|
| 36 |
|
| 37 |
-
If no exception is presently being handled, evaluating a
|
| 38 |
-
*throw-expression* with no operand calls `std::{}terminate()`
|
| 39 |
-
[[except.terminate]].
|
| 40 |
-
|
|
|
|
| 5 |
throw assignment-expressionₒₚₜ
|
| 6 |
```
|
| 7 |
|
| 8 |
A *throw-expression* is of type `void`.
|
| 9 |
|
| 10 |
+
A *throw-expression* with an operand throws an exception
|
| 11 |
+
[[except.throw]]. The array-to-pointer [[conv.array]] and
|
| 12 |
+
function-to-pointer [[conv.func]] standard conversions are performed on
|
| 13 |
+
the operand. The type of the exception object is determined by removing
|
| 14 |
+
any top-level *cv-qualifier*s from the type of the (possibly converted)
|
| 15 |
+
operand. The exception object is copy-initialized [[dcl.init.general]]
|
| 16 |
+
from the (possibly converted) operand.
|
| 17 |
|
| 18 |
A *throw-expression* with no operand rethrows the currently handled
|
| 19 |
+
exception [[except.handle]]. If no exception is presently being handled,
|
| 20 |
+
the function `std::terminate` is invoked [[except.terminate]].
|
| 21 |
+
Otherwise, the exception is reactivated with the existing exception
|
| 22 |
+
object; no new exception object is created. The exception is no longer
|
| 23 |
+
considered to be caught.
|
| 24 |
|
| 25 |
[*Example 1*:
|
| 26 |
|
| 27 |
An exception handler that cannot completely handle the exception itself
|
| 28 |
can be written like this:
|
|
|
|
| 36 |
}
|
| 37 |
```
|
| 38 |
|
| 39 |
— *end example*]
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|