Resource Errors

A resource error occurs when some resource runs out. For example, you can run out of virtual memory, or you can exceed the operating system limit on the number of simultaneously open files.

Often a resource error arises because of a programming mistake: for example, you may exceed the maximum number of open files because your program doesn't close files when it has finished with them. Or, you may run out of virtual memory because you have a non-terminating recursion in your program.

The SICStus_Error term for a resource error is

     resource_error(Goal, Resource)
A copy of the goal, or 0 if no goal was responsible; for example there is no particular goal to blame if you run out of virtual memory.
identifies the resource that was exhausted.
an operating-system-specific message. Usually it will be errno(ErrNo).

Send feedback on this subject.