Module Exceptions

module Exceptions: sig .. end
Module which is used to raise or handle non-fatal exceptions


Module which is used to raise or handle non-fatal exceptions
type exception_type = 
| DIVIDE_BY_ZERO (*
Division by zero
*)
| OVERFLOW (*
Overflow
*)
| PTRINTMATCH (*
Match of a pointer with something which is not a pointer
*)
| UNDEFINEDVAR (*
A variable has not been found in a context
*)
| ALREADYDEFINEDVAR (*
The variable already exists in a context
*)
| WRONGSTACKOFFSET (*
The stack doesn't match a valid stack length
*)
| NONEMPTYCALLSTACK (*
At the end of the program the call stack is not empty
*)
| LOCMATCH (*
Match of a location with something which is not a location
*)
The possible types of the exceptions
type except 
The informations which will be stored about an exception
val exceptions : except list Pervasives.ref
The list of the current exceptions
val exception_type2string : exception_type -> string
Give the description of each exception type
Returns The description of this exception
val handleException : exception_type * Types.generic_stat_loc -> unit
Handle an exception and print the associated error
Returns unit
val raiseException : exception_type -> Types.generic_stat_loc -> unit
Raise an exception
Returns unit
val handleExceptions : unit -> unit
Handle every exception in chronological order
Returns unit