Handle custom error in frappe

How to handle custom errors handling in frappe ??

if some error occurs everything it give traceback so how to hide that traceback in frappe.