Commit 1df4deb
fixes bugs on the Nim manual (nim-lang#24669)
ref https://en.cppreference.com/w/cpp/error/exception/what
> Pointer to a null-terminated string with explanatory information. The
pointer is guaranteed to be valid at least until the exception object
from which it is obtained is destroyed, or until a non-const member
function on the exception object is called.
The pointer is only valid before `CStdException as e` is destroyed
Old examples are broken on macOS arm64
```
/Users/blue/Desktop/nimony/test4.nim(38) test4
/Users/blue/Desktop/nimony/test4.nim(26) fn
/Users/blue/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim(41) failedAssertImpl
/Users/blue/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim(36) raiseAssert
/Users/blue/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim(53) sysFatal
Error: unhandled exception: /Users/blue/Desktop/nimony/test4.nim(26, 3) `$b == "foo2"` [AssertionDefect]
```
(cherry picked from commit e6f6c36)1 parent 1ff69ea commit 1df4deb
2 files changed
+10
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5096 | 5096 | | |
5097 | 5097 | | |
5098 | 5098 | | |
5099 | | - | |
| 5099 | + | |
5100 | 5100 | | |
5101 | 5101 | | |
5102 | 5102 | | |
5103 | | - | |
5104 | | - | |
| 5103 | + | |
| 5104 | + | |
5105 | 5105 | | |
5106 | 5106 | | |
5107 | 5107 | | |
5108 | 5108 | | |
5109 | 5109 | | |
5110 | 5110 | | |
5111 | | - | |
| 5111 | + | |
5112 | 5112 | | |
5113 | 5113 | | |
5114 | | - | |
| 5114 | + | |
5115 | 5115 | | |
5116 | 5116 | | |
5117 | 5117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
0 commit comments