Package lib :: Module arg_check
[hide private]
[frames] | no frames]

Module arg_check

source code

Argument checking functions for the relax user functions.

Functions [hide private]
bool
is_bool(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a Boolean.
source code
bool
is_bool_or_bool_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)
Test if the argument is a Boolean or a list of Booleans.
source code
bool
is_float(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a float.
source code
bool
is_float_array(arg, name=None, size=None, can_be_none=False, raise_error=True)
Test if the argument is a list or a numpy array of floats.
source code
bool
is_float_matrix(arg, name=None, dim=None, can_be_none=False, none_elements=False, raise_error=True)
Test if the argument is a matrix of floats.
source code
bool
is_float_object(arg, name=None, dim=(3, 3), can_be_none=False, raise_error=True)
Test if the argument is a rank-N array of floats.
source code
bool
is_func(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a function.
source code
bool
is_int(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is an integer.
source code
bool
is_int_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, list_of_lists=False, raise_error=True)
Test if the argument is a list of integers.
source code
bool
is_int_or_int_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)
Test if the argument is an integer or a list of integers.
source code
bool
is_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, list_of_lists=False, raise_error=True)
Test if the argument is a list.
source code
bool
is_none(arg, name, raise_error=True)
Test if the argument is None.
source code
bool
is_num(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a number.
source code
bool
is_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a list or numpy array of numbers.
source code
bool
is_num_or_num_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a number or tuple of numbers.
source code
bool
is_num_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a tuple of numbers.
source code
bool
is_str(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a string.
source code
bool
is_str_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, list_of_lists=False, raise_error=True)
Test if the argument is a list of strings.
source code
bool
is_str_or_inst(arg, name=None, can_be_none=False, raise_error=True)
Test if the argument is a string or writable instance (file-like object).
source code
bool
is_str_or_num_or_str_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a number, a string, a list of numbers, or a list of strings.
source code
bool
is_str_or_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a string or a list of numbers.
source code
bool
is_str_or_str_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a string or a list of strings.
source code
bool
is_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a tuple.
source code
bool
is_val_or_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)
Test if the argument is a value (bool, str, or number) or a list of values.
source code
bool
validate_arg(arg, name=None, dim=(), basic_types=[], container_types=[], can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)
Generic validation function for any argument type.
source code
Variables [hide private]
  __package__ = 'lib'

Imports: ndarray, FunctionType, MethodType, lib, from_iterable, RelaxError, RelaxArrayError, RelaxArrayFloatError, RelaxArrayIntError, RelaxArrayNumError, RelaxBoolError, RelaxBoolListBoolError, RelaxFloatError, RelaxFunctionError, RelaxIntError, RelaxIntListIntError, RelaxInvalidError, RelaxListError, RelaxListBoolError, RelaxListFloatError, RelaxListIntError, RelaxListNumError, RelaxListStrError, RelaxMatrixFloatError, RelaxNoneError, RelaxNoneBoolError, RelaxNoneBoolListBoolError, RelaxNoneFloatError, RelaxNoneFunctionError, RelaxNoneIntError, RelaxNoneIntListIntError, RelaxNoneListError, RelaxNoneListFloatError, RelaxNoneListIntError, RelaxNoneListNumError, RelaxNoneListStrError, RelaxNoneMatrixFloatError, RelaxNoneNumError, RelaxNoneNumStrListNumStrError, RelaxNoneNumTupleNumError, RelaxNoneStrError, RelaxNoneStrFileError, RelaxNoneStrListNumError, RelaxNoneStrListStrError, RelaxNoneTupleError, RelaxNoneTupleNumError, RelaxNoneValListValError, RelaxNumError, RelaxNumStrListNumStrError, RelaxNumTupleNumError, RelaxNumpyFloatError, RelaxNumpyIntError, RelaxNumpyNumError, RelaxStrError, RelaxStrFileError, RelaxStrFileListStrFileError, RelaxStrListNumError, RelaxStrListStrError, RelaxTupleError, RelaxTupleNumError, RelaxValListValError, DummyFileObject


Function Details [hide private]

is_bool(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a Boolean.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_bool_or_bool_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)

source code 

Test if the argument is a Boolean or a list of Booleans.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • none_elements (bool) - A flag which if True allows the list to contain None.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_float(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a float.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_float_array(arg, name=None, size=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a list or a numpy array of floats.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The dimension of the array.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_float_matrix(arg, name=None, dim=None, can_be_none=False, none_elements=False, raise_error=True)

source code 

Test if the argument is a matrix of floats.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • dim (tuple of int) - The m,n dimensions of the matrix.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • none_elements (bool) - A flag which if True allows the list to contain None.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_float_object(arg, name=None, dim=(3, 3), can_be_none=False, raise_error=True)

source code 

Test if the argument is a rank-N array of floats.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • dim (tuple of int) - The m,n dimensions of the matrix.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_func(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a function.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_int(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is an integer.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:
  • RelaxIntError - If not an integer (and the raise_error flag is set).
  • RelaxNoneIntError - If not an integer or not None (and the raise_error flag is set).

is_int_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, list_of_lists=False, raise_error=True)

source code 

Test if the argument is a list of integers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • none_elements (bool) - A flag which if True allows the list to contain None.
  • list_of_lists (bool) - A flag which if True allows the argument to be a list of lists.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_int_or_int_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)

source code 

Test if the argument is an integer or a list of integers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • none_elements (bool) - A flag which if True allows the list to contain None.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, list_of_lists=False, raise_error=True)

source code 

Test if the argument is a list.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • list_of_lists (bool) - A flag which if True allows the argument to be a list of lists of strings.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_none(arg, name, raise_error=True)

source code 

Test if the argument is None.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_num(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a number.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:
  • RelaxNumError - If not a number (and the raise_error flag is set).
  • RelaxNoneNumError - If not a number or not None (and the raise_error flag is set).

is_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a list or numpy array of numbers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_num_or_num_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a number or tuple of numbers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_num_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a tuple of numbers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_str(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a string.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:
  • RelaxStrError - If not a string (and the raise_error flag is set).
  • RelaxNoneStrError - If not a string or not None (and the raise_error flag is set).

is_str_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, list_of_lists=False, raise_error=True)

source code 

Test if the argument is a list of strings.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • list_of_lists (bool) - A flag which if True allows the argument to be a list of lists of strings.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_str_or_inst(arg, name=None, can_be_none=False, raise_error=True)

source code 

Test if the argument is a string or writable instance (file-like object).

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:
  • RelaxStrFileError - If not a string or writeable instance (and the raise_error flag is set).
  • RelaxNoneStrFileError - If not a string, writeable instance or not None (and the raise_error flag is set).

is_str_or_num_or_str_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a number, a string, a list of numbers, or a list of strings.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_str_or_num_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a string or a list of numbers.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_str_or_str_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a string or a list of strings.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_tuple(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a tuple.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

is_val_or_list(arg, name=None, size=None, can_be_none=False, can_be_empty=False, raise_error=True)

source code 

Test if the argument is a value (bool, str, or number) or a list of values.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument.
  • size (None or int) - The number of elements required.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows the list to be empty.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:

validate_arg(arg, name=None, dim=(), basic_types=[], container_types=[], can_be_none=False, can_be_empty=False, none_elements=False, raise_error=True)

source code 

Generic validation function for any argument type.

This function can be used to validate the value of any argument, raising a RelaxError specific for the argument for detailed user feedback.

Types

The basic Python data types allowed for the argument are specified via the basic_types argument. The currently supported values include:

  • 'all': Special value used to deactivate type-checking.
  • 'bool': Boolean values (True and False).
  • 'float': Floating point numbers.
  • 'func': Python function objects.
  • 'int': Integer numbers.
  • 'number': Special value allowing for any number type.
  • 'str': String objects.
  • 'file object read': Readable file objects (instance of file or any object with read methods).
  • 'file object write': Writable file objects (instance of file or any object with write methods).

The 'number' value is special in that it allows for both 'int' and 'float' values. If the argument should be a higher rank object, then the container_types argument should be supplied. The allowed values currently include:

  • 'all': Special value used to deactivate type-checking.
  • 'list': Python lists.
  • 'number array': Special value meaning both 'list' and 'numpy array'.
  • 'numpy array': NumPy array objects.
  • 'set': Python sets.
  • 'tuple': Python tuples.

Here, the 'number array' is also special and allows for both 'list' and 'numpy array' containers. Note that only the basic types 'float', 'int', and 'number' are allowed with this value.

Rank and dimensionality

To distinguish between basic Python data types and higher rank container types, as well as fixing the dimensionality of the higher rank objects, the 'dim' parameter should be supplied. This should be a tuple with elements consisting of integers or None. If multiple ranks or dimensionality are allowed, then a list of tuples can be supplied.

Rank

The number of elements of the 'dim' tuples define the rank. For example a number is rank 0, a vector is rank 1, and a matrix is rank 2.

Dimensionality

The dimensionality, or number of elements, for each rank are fixed by supplying integers in the 'dim' tuple. If the dimensionality can be variable, the value of None should be supplied instead.

Examples

For basic Python data types, use the empty tuple:

  • dim=()

For a list of basic data types of unknown length, use:

  • dim=(None,)

For a numpy array of 5 elements, use:

  • dim=(5,)

For a numpy 3D matrix, use:

  • dim=(3,3)

For a simple string or list of string, use:

  • dim=[(), (None,)]

Fall back error

For arguments which do not currently have a specific RelaxError for telling the user what the did wrong, the fall back RelaxInvalidError object will be raised. If more detailed feedback to the user is desired, then a new RelaxError object should be created and added in the failure section of this function.

Parameters:
  • arg (anything) - The argument.
  • name (str) - The plain English name of the argument, used in the RelaxError printout.
  • dim (tuple of (int or None) or list of tuples of (int or None)) - The dimensions of the object to check.
  • basic_types (list of str) - The types of values are allowed for the argument.
  • container_types (list of str) - The container types allowed for the argument.
  • can_be_none (bool) - A flag specifying if the argument can be none.
  • can_be_empty (bool) - A flag which if True allows container types to be empty.
  • none_elements (bool) - A flag which if True allows container types to contain None.
  • raise_error (bool) - A flag which if True will cause RelaxErrors to be raised.
Returns: bool
The answer to the question (if raise_error is not set).
Raises:
  • RelaxError - If the function arguments are incorrectly supplied.
  • RelaxArrayError - If a list or numpy array is expected (and the raise_error flag is set).
  • RelaxArrayFloatError - If a list or numpy array of floats is expected (and the raise_error flag is set).
  • RelaxArrayIntError - If a list or numpy array of integers is expected (and the raise_error flag is set).
  • RelaxArrayNumError - If a list or numpy array of numbers is expected (and the raise_error flag is set).
  • RelaxBoolError - If a Boolean value is expected (and the raise_error flag is set).
  • RelaxBoolListBoolError - If a Boolean or list of Booleans is expected (and the raise_error flag is set).
  • RelaxFloatError - If a float value is expected (and the raise_error flag is set).
  • RelaxFunctionError - If a function is expected (and the raise_error flag is set).
  • RelaxIntError - If an integer value is expected (and the raise_error flag is set).
  • RelaxIntListIntError - If an integer value or list of integers is expected (and the raise_error flag is set).
  • RelaxListError - If a list of different basic types is expected (and the raise_error flag is set).
  • RelaxListBoolError - If a list of Booleans is expected (and the raise_error flag is set).
  • RelaxListFloatError - If a list of floats is expected (and the raise_error flag is set).
  • RelaxListIntError - If a list of integers is expected (and the raise_error flag is set).
  • RelaxListNumError - If a list of numbers is expected (and the raise_error flag is set).
  • RelaxListStrError - If a list of strings is expected (and the raise_error flag is set).
  • RelaxNumError - If a number value is expected (and the raise_error flag is set).
  • RelaxNumTupleNumError - If a number or tuple of numbers is expected (and the raise_error flag is set).
  • RelaxNumpyFloatError - If a numpy array of floats is expected (and the raise_error flag is set).
  • RelaxNumpyIntError - If a numpy array of integers is expected (and the raise_error flag is set).
  • RelaxNumpyNumError - If a numpy array is expected (and the raise_error flag is set).
  • RelaxStrError - If a string value is expected (and the raise_error flag is set).
  • RelaxStrFileError - If a string value or file object is expected (and the raise_error flag is set).
  • RelaxStrFileListStrFileError - If a string value, file object, list of strings, or list of file objects is expected (and the raise_error flag is set).
  • RelaxStrListStrError - If a string value or list of string values is expected (and the raise_error flag is set).
  • RelaxTupleNumError - If a tuple of numbers is expected (and the raise_error flag is set).
  • RelaxInvalidError - For all argument combinations not covered by a specific RelaxError (and the raise_error flag is set).