public static @Nullable ErrorInfo getErrorForComponent(final @NotNull IComponent component){
    // Check bind to class errors
    {
      final ErrorInfo errorInfo = (ErrorInfo)component.getClientProperty(CLIENT_PROP_CLASS_TO_BIND_ERROR);
      if(errorInfo != null){
        return errorInfo;
      }
    }

    // Check binding errors
    {
      final ErrorInfo error = (ErrorInfo)component.getClientProperty(CLIENT_PROP_BINDING_ERROR);
      if(error != null){
        return error;
      }
    }

    // General error
    {
      final ArrayList<ErrorInfo> errorInfo = getErrorInfos(component);
      if(errorInfo != null && !errorInfo.isEmpty()){
        return errorInfo.get(0);
      }
    }

    return null;
  }
public static @Nullable ErrorInfo getErrorForComponent(final @NotNull IComponent component)