Skip to content

Commit 957f624

Browse files
committed
Update tutorial.mdx
1 parent 10e6014 commit 957f624

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

content/tutorial.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void alloc_memory(double **arr, const size_t n)
8888
}
8989
```
9090
However, this doesn't do much by itself as it only silently records an error.
91-
We will have to modify the `main` function.
91+
We will also have to modify the outer scope.
9292
9393
### `TRY` <Badge text="Macro" />
9494
On the outer scope, we can wrap our function call with [`TRY`](/docs/API/call_stack_management#try-), which
@@ -302,6 +302,7 @@ SignalSegmentationFault
302302
--------------------------------------------------------------------------------
303303
Segmentation fault (core dumped)
304304
```
305+
<Callout type="info">There is no colors and fancy output in signal handlers to ensure that it works on all systems.</Callout>
305306
306307
### `TRACE_BLOCK` <Badge text="Macro" />
307308
Similar to [`TRY`](/docs/API/call_stack_management#try-) and [`TRY_BLOCK`](/docs/API/call_stack_management#try-block-),
@@ -508,4 +509,10 @@ You should see the following output:
508509
```ansi
509510
Warning: File "/home/alvinng/Desktop/c_traceback/examples/example_tut04.c", line 73 in divide_vec:
510511
Denominator should not be zero! Received: 0.000000.
511-
```
512+
```
513+
514+
## Closing Note
515+
To use our framework, make sure to
516+
* Clear context and install signal handler at program entry
517+
* Wrap function calls with either `TRACE` or `TRY`
518+
* Remember to check for errors

0 commit comments

Comments
 (0)