Package etithespirit.exception
Class ArgumentNullException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
etithespirit.exception.ArgumentNullException
- All Implemented Interfaces:
Serializable
The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument. It is a more precise alternative to
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See System.ArgumentNullException
IllegalArgumentException
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See System.ArgumentNullException
- Author:
- Microsoft (for the .NET implementation), Eti (for the Java implementation)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentNullException
(String parameterName) The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=net-5.0ArgumentNullException
(String parameterName, String message) The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=net-5.0 -
Method Summary
Modifier and TypeMethodDescriptionstatic void
throwIfNull
(Object obj, String parameterName) Alias method to ensure that a parameter is non-null (by reference).Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ArgumentNullException
The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=net-5.0- Parameters:
parameterName
- The parameter that was null when it should have not been.
-
ArgumentNullException
The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.
Derived from .NET (mscorlib.dll, System.Runtime.dll) // See https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=net-5.0- Parameters:
parameterName
- The parameter that was null when it should have not been.message
- The message to add onto the null error.
-
-
Method Details
-
throwIfNull
Alias method to ensure that a parameter is non-null (by reference).- Parameters:
obj
- The value of the parameter.parameterName
- The name of the parameter.- Throws:
ArgumentNullException
- If the value is equal to null.
-
getMessage
- Overrides:
getMessage
in classThrowable
-