(*
    Title: 	Execptions - Definitions
    LastEdit:	"Tue Sep 11 12:14:39 1984"
    Author: 	Mick Jordan
		Acorn Research Centre
*)

DEFINITION MODULE Exceptions;

EXPORT QUALIFIED 
    RAISE, RAISEC, StdException;

PROCEDURE RAISE(ex: ARRAY OF CHAR);
(*  This procedure is intended as a substitute
    for the language-level facility 'RAISE ex'.
    The intention is that the string 'ex' is the same as
    the name of the EXCEPTION that would otherwise be used.
    
    There is no mechanism for catching such exceptions.
    The procedure will attempt to display the text of 'ex'
    in some way and then abort the program.
    Of course, an individual program may choose to provide
    an alternative implementation.
*)

(* 
    This interface is intended for use by the compiler,
    so that the standard run-time exceptions can be mapped
    into this interface.
*)

TYPE   (* standard exceptions *)
    StdException = (ArrayIndexOutOfRange, CaseIndexOutOfRange,
                    ReturnMissing, AssignmentOutOfRange, HaltFault);

PROCEDURE RAISEC(code: StdException);
(*  calls RAISE(message), where message relates to 'code'
*)

END Exceptions.
