%% Copyright (c) 1995,1996 by the University of Pennsylvania %% %% For information about the distributaion, copying, and modification %% %% of this software, please read the file COPYING located in the root %% %% directory of this distribnutaion. If you did not receive the file %% %% COPYING write to Philip Wickline at the address below. %% %% This program is distributed in the hope that it will be useful but %% %% WITHOUT ANY WARRANTY; without even the implied warranty of %% %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file %% %% COPYING for more details. %% %% For information about the structure of the Terzo lambdaProlog %% %% implementation, see the file src/README in this distribution. Please %% %% address any questions about this code or the Terzo lambdaProlog %% %% implementation to Philip Wickline at . %% %% Authors: %% %% Philip Wickline %% module Exception. kind exn type. type exception exn -> o. % exception excep % exception raises the exception excep. type handle exn -> o -> o -> o. % handle excep goal1 goal2 % Attempt to solve goal1, if goal1 fails or succeeds, % then do the same. If goal1 raises an exception that % matches excep, then backtrack and attempt to solve goal2, % and fail or succeed if it does.