module RuntimeError: sig
.. end
This module defines runtime errors that are reported to the user
Author(s): Tony BenBrahim < tony.benbrahim at gmail.com >
exception InternalError of string
this error represents an unexpected condition, caused by a programming
error in the interpreter implementation
exception LibraryError of string
this error is a generic error thrown by library routines to indicate an
error condition, such as the incorrect type of a passed in argument
exception LexerException of string * int * int
this error is caused by an abnormal error caused by the lexer, such as an
unterminated string *
exception FatalExit
marker exception to note that the program should exit, error has already
been reported during analysis
exception EIncompatibleTypes of string * string
indicates that an assignment was attempted on two incompatible types
exception EInvalidCast of string * string
indicates that the value is not of the expected type
exception EInvalidOperation of string * string
indicates that an invalid operation was attempted on the specified types
exception EInvalidComparaison of string * string * string
indicates that an invalid comparaison was attempted on the given types
exception ELeftSideIsNotAMap of string * string
indicates that a member expression is not applied to a map
exception ELeftSideIsNotAMap of string * string
indicates that a member expression is not applied to a map
exception ELeftSideCannotBeAssigned
indicates an attempt at an assignment to something that is a not a variable or map
exception EInvalidMember of string * string
indicates that the map member did not evaluate to a string or integer
exception EUndefinedMapMember of string
indicates that a reference was made to a map member that does not exist
exception EInvalidArrayIndex of string * string
indicates a non integer array index
exception EArrayIndexOutOfBounds of string
indicates an out of bounds index
exception ETypeMismatchInAssignment of string * string * string
indicates that the type in the assignment does not match the declare type
exception EMismatchedFunctionArgs of int * int
indicates that an incorrect number of arguments were passed to a function
exception ENotAFunction
indicates an attempt to apply a function to a non function
exception ENotACollectionType of string * string
indicates applying for each on a non collection type
exception EDefaultCaseShouldBeLast
indicates that the default case should be last
exception ParseException of string
indicates a parsing error
val string_of_error : exn -> string
Returns an error message for an exception
Returns error message
ex
: exception
val display_error : exn -> string * int -> unit
Displays an error to stdout
err
: exception
cloc
: tuple of file, line where error occured