catch ( Exception e )
{
LOG.error( e.getLocalizedMessage(), e );
DnsMessage request = ( DnsMessage ) message;
DnsException de = ( DnsException ) e;
DnsMessageModifier modifier = new DnsMessageModifier();
modifier.setTransactionId( request.getTransactionId() );
modifier.setMessageType( MessageType.RESPONSE );
modifier.setOpCode( OpCode.QUERY );
modifier.setAuthoritativeAnswer( false );
modifier.setTruncated( false );
modifier.setRecursionDesired( request.isRecursionDesired() );
modifier.setRecursionAvailable( false );
modifier.setReserved( false );
modifier.setAcceptNonAuthenticatedData( false );
modifier.setResponseCode( ResponseCode.convert( ( byte ) de.getResponseCode() ) );
modifier.setQuestionRecords( request.getQuestionRecords() );
modifier.setAnswerRecords( new ArrayList<ResourceRecord>() );
modifier.setAuthorityRecords( new ArrayList<ResourceRecord>() );
modifier.setAdditionalRecords( new ArrayList<ResourceRecord>() );