@@ -88,7 +88,7 @@ void alloc_memory(double **arr, const size_t n)
8888}
8989```
9090However, 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" />
9494On the outer scope, we can wrap our function call with [`TRY`](/docs/API/call_stack_management#try-), which
@@ -302,6 +302,7 @@ SignalSegmentationFault
302302--------------------------------------------------------------------------------
303303Segmentation 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" />
307308Similar 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[1 ;33mWarning :[0m [38 ;5 ;240mFile " [0m[38;5;240m/home/alvinng/Desktop/c_traceback/examples/[0m[1;36mexample_tut04.c[0m[38;5;240m" , line [0m [1 ;36m73 [0m [38 ;5 ;240min [0m [1 ;36mdivide_vec [0m :
510511 [0 ;33mDenominator should not be zero ! Received : 0.000000 .[0m
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