Capture error in web application

How to capture errors in an web application ,.

For eg: If a per performed action throws an error in web application on the screen ,how capture it using ui application

Hi @vikumars ,
You use the log to write the error or you take screen shot of error.

Log Error.

or

Regards
Balamurugan.S