Skip to content

Commit 513a09d

Browse files
Update panic.md
1 parent afb3352 commit 513a09d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/panic.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@ There are 2 types of states where panics come.
33
For example, the soft_panic, is the normal and
44
safer version of the panic, whereas target_panic
55
is a hard crash type of panic, not a regular type
6-
of error.
6+
of error.
7+
8+
The regular panic normally used, `control.panic` implementation looks like this in the runtime.
9+
``` ts
10+
export function panic(code: number) {
11+
U.userError("PANIC! Code " + code) // throw a panic code to the problems pane
12+
}
13+
```

0 commit comments

Comments
 (0)