Skip to content

Commit 21f4d73

Browse files
Update target_panic.md
1 parent 8ccbabf commit 21f4d73

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/target_panic.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Target Panic
22

3-
`pxt::target_panic(code: number)` is **not** a regular function to be used. Instead, you are able to use it in the
4-
C, C++, and the runtime JavaScript layer.
5-
6-
Here is an example of the function's implementation.
3+
The `pxt::target_panic(code: number)` panic is **not** a regular function to be used. Instead, it is able to be used in the
4+
C, C++, and the runtime TypeScript layer.
75

6+
## Implementation
7+
In the C++ runtime, the target_panic looks like something like this.
88
``` cpp
99
extern "C" void target_panic(int code) {
1010
DMESG("PANIC %d", code);
11-
exit(1);
11+
exit(1); // EXIT: this a builtin method in the C++ standard libraries, unrelated to MakeCode specific runtime functions
1212
}
1313
```
1414

0 commit comments

Comments
 (0)