How to read an exception?

If function adl_memRelease fails, it generates exceptions (according to ADL User Guide):
RTK exception 155 - The supplied address is out of the heap memory address range
RTK exception 161 or 166 - The supplied buffer header or footer data is corrupted: a write overflow has occurred on this block
RTK exception 159 or 172 - The heap memory release process has failed due to a global memory corruption in the heap area
How can I read which one of these exceptions has generated?

I guess you can do it with trace tool from m2m studio.

Can I do it by my application?