Retrieve error using the RTDE interface

Is it possible to get error messages using the RTDE interface? I was able to send messages using RTDE_TEXT_MESSAGE package, and the messages I sent appeared Log tab in the simulator. I wanted to know is it possible to retrieve the errors/ exception messages when some goes wrong (eg: robot goes to protective stop) using the RTDE_TEXT_MESSAGE or any other way using the RTDE interface.

The safety_status bits will give you what you are looking for

@moliveira thanks for the reply. I also want to know the use of RTDE_TEXT_MESSAGE package, can we retrieve detailed error messages/ exceptions in this data package?

These links should help you.

1st. API reference
https://sdurobotics.gitlab.io/ur_rtde/api/api.html#c.ur_rtde::RTDEReceiveInterface::getSafetyMode

2nd. Using RTDE_TEXT_MESSAGE as a logger