Class ErrorMessages

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

public final class ErrorMessages
extends java.lang.Object
Utility class for common WPILib error messages.
  • Method Summary

    Modifier and Type Method Description
    static <T> T requireNonNullParam​(T obj, java.lang.String paramName, java.lang.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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • requireNonNullParam

      public static <T> T requireNonNullParam​(T obj, java.lang.String paramName, java.lang.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.
      Parameters:
      obj - The parameter that must not be null.
      paramName - The name of the parameter.
      methodName - The name of the method.