Error messages by MINERVA:
Run time exceptions should be dealt with catch/3. Uncaught exceptions will ripple upwards.
In addition to error messages created by MINERVA. you may encounter error messages created by the underlying Java. Java errors can be caused by wrong file names, firewalls preventing access, incomplete installation of browsers or Java processors, and various bugs in the Java processors.
The following shows an example of minervac diagnostics including "hard" errors and heuristic warnings.
% MINERVA (c) IF Computer 1996,97 % http://www.ifcomputer.com/MINERVA mailto:support@ifcomputer.com
% if you refer to a nonexisting package the compiler will complain. % :- package(nonexisting). % ** minerva compiler: error(existence_error(source_sink,'nonexisting.mpk'), % [goal = open('nonexisting.mpk',read,_291,[file,buffered,text])])
main(Args) :- a(missing), b(Lone), c.
% Variables are used to transport information. % Subspect typo of variable name(s) b(Variable) :- c(Var).
% This Variable is marked with '_' b(_Variable) :- c.
% Predicates are in one place by convention. % Suspect typo of predicate name.
c(whatever). b(one_more).
% Predicates start in the first column by convention. % Suspect e.g. ',' mistaken for '.'
d :- d1, d2. d3.
d1. d2. d3.
% And a couple of 'real' syntax violations.
err1 :- . err2 :- err3(. err4 :- err3). err5 :- write([a,b,c,d). err6 :- write((a,b,c,d])).
A is 5 is 7.
minervac manyerrors MINERVA 1.0 Development Server http://www.ifcomputer.com/MINERVA (c) IF Computer 1996,1997 Licenced to ifcomputer.comcompile: manyerrors.min -> manyerrors.ass *** syntax warning: singlevariable(Args) >>> file = manyerrors.min, line = 11, column = 6 *** syntax warning: singlevariable(Lone) >>> file = manyerrors.min, line = 13, column = 4 *** syntax warning: singlevariable(Variable) >>> file = manyerrors.min, line = 18, column = 3 *** syntax warning: singlevariable(Var) >>> file = manyerrors.min, line = 18, column = 18 *** compiler warning: discontiguous predicate: b / 1 *** syntax warning: term does not start at 1st column >>> file = manyerrors.min, line = 36 *** compiler warning: discontiguous predicate: d3 / 0 *** syntax error: term expected, fullstop >>> file = manyerrors.min, line = 44, column = 9 *** syntax error: term expected, fullstop >>> file = manyerrors.min, line = 45, column = 14 *** syntax error: not in bracket-context, ')' >>> file = manyerrors.min, line = 46, column = 13 *** syntax error: not in bracket-context, ')' >>> file = manyerrors.min, line = 47, column = 23 *** syntax error: not in list-context, ']' >>> file = manyerrors.min, line = 48, column = 23 *** syntax error: precedence error, is >>> file = manyerrors.min, line = 50, column = 3 *** compiler error: undefined predicate: a / 1 *** compiler error: undefined predicate: c / 0
| scroll to top |
|