How to detect a XMLRPC failure with RTDE or other client interfaces?

I am currently exclusively communicating with the robot using URScript and I would like to get rid of the programming pendent. The last piece I am working is the ability to display an error prompt on my UI when there is an XMLRPC failure. When the failure occurs the robot_mode is 7 (Running), safety_status is 1 (Normal) and the robot_status_bits are 1 (Power On). I would also like the ability to display the actual error but I am not sure how I can get to the actual logs in real time.

Any help will be greatly appreciated.