How can I customize the default exception tcp_error?