Next: , Previous: , Up: ref-ere-err   [Contents][Index]


4.15.4.8 Permission Errors

A permission error occurs when an operation is attempted that is among the kinds of operation that the system is in general capable of performing, and among the kinds that you are in general allowed to request, but this particular time it is not permitted. Usually, the reason for a permission error is that the owner of one of the objects has requested that the object be protected.

For example, an attempts to assert or retract clauses for a predicate that has not been declared :-dynamic is rejected with a permission error.

File system protection is another major source of such errors.

The SICStus_Error term associated with a permission error is

permission_error(Goal, Operation, ObjectType, Culprit, Message)
Operation

operation attempted; Operation exists but is not permitted with Culprit.

ObjectType

Culprit’s type.

Culprit

name of protected object.

Message

provides such operating-system-specific additional information as may be available. A message of 0 or '' provides no further information.

A permission error does not necessarily cause an exception to be thrown. For I/O predicates, the behavior can be controlled with the fileerrors Prolog flag (see ref-lps-flg) or with the fileerrors/1 alias file_errors/1 option to absolute_file_name/3, exactly as for existence errors.


Send feedback on this subject.