Notes on using lib_trycatch

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
XCore Addict
Posts: 150
Joined: Tue Mar 26, 2013 12:10 pm

Notes on using lib_trycatch

Postby johned » Tue Feb 20, 2018 6:29 pm

The XMOS Try/Catch library can be used to catch exceptions.

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

Example of catching an application thrown exception:

Example of catching a hardware exception:

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 for more details.

Who is online

Users browsing this forum: No registered users and 27 guests