@SuppressWarnings("checkstyle:MethodName")
  static @Nullable Component getOrConvertMessage(final @Nullable Throwable throwable) {
    if (throwable instanceof ComponentMessageThrowable) {
      return ((ComponentMessageThrowable) throwable).componentMessage();
    } else if (throwable != null) {
      final String message = throwable.getMessage();
      if (message != null) {
        return Component.text(message);
      }
    }
    return null;
  }
Gets the {@link Component}-based message from a {@link Throwable}, or converts {@link Throwable#getMessage()}.

@param throwable the throwable
@return the message
@since 4.0.0
api/src/main/java/net/kyori/adventure/util/ComponentMessageThrowable.java