is it possible print error or exception on a UI.text?

the application sometimes makes an error.
It is on Android and I couldnt find the problem.
Can I print the error on a UI.text variable?
if the answer is yes.
Can you give me some info about it?

thank you element_wsc.