Class ErrorMessages

java.lang.Object
edu.wpi.first.wpilibj.util.ErrorMessages

public final class ErrorMessages
extends Object
Utility class for common WPILib error messages.
  • Method Details

    • requireNonNullParam

      public static <T> T requireNonNullParam​(T obj, String paramName, String methodName)
      Requires that a parameter of a method not be null; prints an error message with helpful debugging instructions if the parameter is null.
      Type Parameters:
      T - Type of object.
      Parameters:
      obj - The parameter that must not be null.
      paramName - The name of the parameter.
      methodName - The name of the method.
      Returns:
      The object parameter confirmed not to be null.