This module declares the error exception used by the stable stub
generator. There is an exception E
which is used to propagate
error messages to the top level procedure in Main.m3
. Warning()
and Failure()
are used to print out warnings to the standard
error stream. They do not halt the generation of stub code. Further
there is a Fatal()
procedure which halts the stub generator in
case of an unexpected error.
INTERFACEStablegenError ; EXCEPTION E(TEXT); PROCEDURE Warning (msg: TEXT);
Writemsg
toStdio.stderr
, preceeded by ''stablegen (warning):`` and followed by a newline
PROCEDURE Failure (msg: TEXT);
Writemsg
toStdio.stderr
, preceeded by ''stablegen error:`` and followed by a newline
PROCEDURE Fatal (msg: TEXT);
Writemsg
toStdio.stderr
, preceeded by ''stablegen: ***fatal error***`` and and halt the program (Process.Exit()
)
END StablegenError.