public void handleException( ParseException ex, SIPMessage sipMessage, Class hdrClass, String header, String message) throws ParseException { if (LogWriter.needsLogging) stack.logWriter.logException(ex);  if ((hdrClass!=null) && (hdrClass.equals(From.class) || hdrClass.equals(To.class) || hdrClass.equals(CSeq.class) || hdrClass.equals(Via.class) || hdrClass.equals(CallID.class) || hdrClass.equals(RequestLine.class) || hdrClass.equals(StatusLine.class))) { stack.logBadMessage(message); throw ex; } else { sipMessage.addUnparsed(header); } }
public void handleException(ParseException ex, SIPMessage sipMessage, Class hdrClass, String header, String message) throws ParseException { if (sipStack.isLoggingEnabled()) sipStack.logWriter.logException(ex);  if ((hdrClass != null) && (hdrClass.equals(From.class) || hdrClass.equals(To.class) || hdrClass.equals(CSeq.class) || hdrClass.equals(Via.class) || hdrClass.equals(CallID.class) || hdrClass.equals(RequestLine.class) || hdrClass .equals(StatusLine.class))) { if (sipStack.isLoggingEnabled()) { this.getSIPStack().getLogWriter().logDebug( "Encountered Bad Message \n" + sipMessage.toString()); } throw ex; } else { sipMessage.addUnparsed(header); } }
    public void handleException(    ParseException ex,    SIPMessage sipMessage,    Class hdrClass,    String header,    String message)    throws ParseException {        if (LogWriter.needsLogging)            stack.logWriter.logException(ex);        // Log the bad message for later reference.        if ((hdrClass!=null) && (hdrClass.equals(From.class)        || hdrClass.equals(To.class)        || hdrClass.equals(CSeq.class)        || hdrClass.equals(Via.class)        || hdrClass.equals(CallID.class)        || hdrClass.equals(RequestLine.class)        || hdrClass.equals(StatusLine.class))) {            stack.logBadMessage(message);            throw ex;        } else {            sipMessage.addUnparsed(header);        }    }