Trapping 404 errors

Has anyone found a way to trap any 404 error with d6 please

Thanks