Notes on using lib_trycatch

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
XCore Addict
Posts: 158
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.
User avatar
Experienced Member
Posts: 113
Joined: Fri Dec 11, 2009 10:22 am

Postby andrew » Thu May 03, 2018 8:50 am

Thanks John

Who is online

Users browsing this forum: ZrogkoolT and 52 guests