in reply to trapping mysql errors

It seems like a memory problem to me. Either the max_allowed_packet variable value is to small, or your queries require more memory than has been allocated for mysqld. Also, it could be that someone is trying to get on without authorization or with a bad password. See the MySQL Reference Manual for aborted connections:

Aborted Connections