public void writeError(Exception xany, String msg) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace(msg, xany);
    }
    throw SerializationProxy.ProxyException.convert(xany);
  }
Called when an error occurs during write.
<p>Default is to throw a ProxyException.</p>

@param xany an exception
@param msg the message
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/Serializer.java