From jan@swi.psy.uva.nl  Fri Mar 24 16:15:22 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id QAA01214;
	Fri, 24 Mar 2000 16:15:22 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id QAA07475;
	Fri, 24 Mar 2000 16:15:32 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Veit Reuer <vreuer@compling.hu-berlin.de>
Subject: Re: retract on static term
Date: Fri, 24 Mar 2000 16:10:45 +0100
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <Pine.SUN.3.91.1000324154049.6576C-100000@zeus>
In-Reply-To: <Pine.SUN.3.91.1000324154049.6576C-100000@zeus>
Cc: prolog@gollem.swi.psy.uva.nl
MIME-Version: 1.0
Message-Id: <00032416153200.05070@gollem>
Content-Transfer-Encoding: 8bit

On Fri, 24 Mar 2000, you wrote:
>Hi,
>may I pose the question directly to you?
>I changed from SWI-prolog 2.9. to 3.3. and now I get the following message.
>The retract-call on a static_procedure used to work in any case.
>
>ERROR: No permission to modify static_procedure `promisd:lex/2'
>^  Exception: (8) retractall(lex(_G3470)) ?
>
>Do I have to put a catch/3 around all the goals in order to avoid this?

There has been some discussion on this on the mailinglist.

Depends a lot what you want.  Do you want to get rid of the clauses
of lex/2?  Then use abolish/1.  Do you retract, but you are not sure
what you are retracting and you want to fail on static procedures?
Then using catch is a good choice.

Basically, catch is for dealing with things that may happen, you
don't really expect to happen but you do want to deal with it.

	Regards --- Jan

