We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ccbabf commit 21f4d73Copy full SHA for 21f4d73
1 file changed
docs/target_panic.md
@@ -1,14 +1,14 @@
1
## Target Panic
2
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.
+The `pxt::target_panic(code: number)` panic is **not** a regular function to be used. Instead, it is able to be used in the
+C, C++, and the runtime TypeScript layer.
7
+## Implementation
+In the C++ runtime, the target_panic looks like something like this.
8
``` cpp
9
extern "C" void target_panic(int code) {
10
DMESG("PANIC %d", code);
11
- exit(1);
+ exit(1); // EXIT: this a builtin method in the C++ standard libraries, unrelated to MakeCode specific runtime functions
12
}
13
```
14
0 commit comments