4.15.4.5 Representation Errors

A representation error occurs when your program calls for the computation of some well-defined value that cannot be represented.

Most representation errors are some sort of overflow:

     functor(T, f, 1000)             % maximum arity is 255
     
     
     atom_codes(X, L)                % if length of L > 65535

are all representation errors. Floating-point overflow is a representation error.

The SICStus_Error term for a representation error is

     representation_error(Goal, ArgNo, Message)
ArgNo
identifies the argument of the goal that cannot be constructed.
Message
further classifies the problem. A message of 0 or '' provides no further information.

Send feedback on this subject.