Page 1 of 1

Notes on using lib_trycatch

Posted: Tue Feb 20, 2018 6:29 pm
by johned
The XMOS Try/Catch library https://www.xmos.com/support/libraries/lib_trycatch can be used to catch exceptions.

Handling exceptions correctly avoids the core sitting in the trap handler.

Example of catching an application thrown exception: https://github.com/xmos/lib_trycatch/bl ... rc/main.xc

Example of catching a hardware exception:
https://github.com/xmos/lib_trycatch/bl ... rc/main.xc

The limitation is that lib_trycatch won’t attempt to free any resources allocated inside the try block or return any variables to their original state in the event of an exception being raised. See https://github.com/xmos/lib_trycatch/bl ... README.rst for more details.

Re: Notes on using lib_trycatch

Posted: Thu May 03, 2018 8:50 am
by andrew
Thanks John