Package edu.wpi.first.util
Class ErrorMessages
java.lang.Object
edu.wpi.first.util.ErrorMessages
Utility class for common WPILib error messages.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
Method Details
-
requireNonNullParam
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.
-