Class UnrepresentingArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.AbstractInvalidArgumentException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.UnrepresentingArgumentException
- All Implemented Interfaces:
Serializable
A
UnrepresentingArgumentException is a
AbstractInvalidArgumentException that is supposed to be thrown when a
given argument does undesirable not represent an object of a given type.- Author:
- Silvan Wyss
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionforArgumentAndArgumentNameAndType(Object argument, String argumentName, Class<?> type) forArgumentAndType(Object argument, Class<?> type) Methods inherited from class AbstractInvalidArgumentException
getArgumentName, getErrorPredicate, getStoredArgumentMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
forArgumentAndArgumentNameAndType
public static UnrepresentingArgumentException forArgumentAndArgumentNameAndType(Object argument, String argumentName, Class<?> type) - Parameters:
argument-argumentName-type-- Returns:
- a new
UnrepresentingArgumentExceptionfor the given argument, argumentName and type. - Throws:
RuntimeException- if the given argumentName is null or blank.RuntimeException- if the given type is null.
-
forArgumentAndType
- Parameters:
argument-type-- Returns:
- a new
UnrepresentingArgumentExceptionfor the given argument and type. - Throws:
RuntimeException- if the given type is null.
-