public void writeException(DataOutputStream dos, byte type, Exception ex,
      KnownVersion clientVersion)
      throws IOException {
    writeHandshakeMessage(dos, type, ex.toString(), clientVersion, (byte) 0x00, 0);
  }
Writes an exception message to the socket

@param dos the <code>DataOutputStream</code> to use for writing the message
@param type a byte representing the exception type
@param ex the exception to be written; should not be null
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SocketMessageWriter.java