A range error occurs when an output argument was supplied with an illegal value. This is similar to a type error or a domain error, except that it is a hint that a variable would be a good thing to supply instead; type and domain errors are associated with input arguments, where a variable would usually not be a good idea.
The exception code associated with a range error is
range_error(Goal, ArgNo, TypeName, Culprit)
This has the same arguments as a type error.
Most built-in predicates do not raise any range errors. Instead they fail quietly when an output argument fails to unify.