Go to the first, previous, next, last section, table of contents.


Error reporting when using objects

Author(s): Angel Fernandez Pineda.

Version: 1.3#120 (1999/11/26, 12:5:17 MET)

Version of last change: 1.3#79 (1999/10/13, 18:48:0 MEST)

Compile-time errors are restricted to some local analysis. Since there is no type declaration in the Prolog language, there is no posibility to determine whenever a given variable will hold an instance of any class.

However, little semantic analysis is performed. User may aid to perform such an analysis by the usage of run time checks (which are also detected at compile time), or static declarations. For example:

clause(Obj) :- Obj:a_method(334).

O'CIAO may be not able to determine whenever a_method/1 is a valid method for instance Obj, unless some help is provided:

clause(Obj) :- Obj instance_of myclass,Obj:a_method(334).

In such case, O'CIAO will report any semantic error at compile-time. Most of the run-time errors are related to normal CIAO Prolog module system. Since objects are treated as normal Prolog modules at run time, there is no further documentation here about that stuff.

Error reporting at compile time (objects)