code: public static byte[] serialize(Object obj, String errorMessage) {
      try {
        return serialize(obj);
      } catch (IOException e) {
        throw new RuntimeException(errorMessage, e);
      }
    }
docs: Wrapper around {@link #serialize(Object)} which throws a runtime exception with the given
  message on failure.
  
  @param obj the object the serialize
  @param errorMessage the message to show if serialization fails
  @return the serialized bytes