From b2d8dcd8673cfcdbf1e8a02aa19c53e42b8a60b6 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Mon, 19 May 2025 21:17:49 +0200 Subject: Transition from exception-based errors to printf-based --- exn_handler.fun | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'exn_handler.fun') diff --git a/exn_handler.fun b/exn_handler.fun index b4e7275..c0a2d7a 100644 --- a/exn_handler.fun +++ b/exn_handler.fun @@ -1,6 +1,4 @@ -functor ExnHandler(structure T: TOKENIZER; structure P: PPC): - EXN_HANDLER = -struct +structure ExnHandler: EXN_HANDLER = struct val eprintf = fn z => printf `"error: " z @@ -31,12 +29,7 @@ struct fun handler e = ( printf `"\n"; case e of - T.FsmTableIsTooSmall => - eprintf `"fsm table is too small. Increate 'maxState' value\n" % - | IO.Io _ => ioExn e - | T.TkErrorAug (pos, msg) => eprintf T.S.Ppos pos `": " `msg `"\n" % - | P.TkError v => P.tkErrorPrint v - | P.TkClassError v => P.tkClassErrorPrint v + IO.Io _ => ioExn e | _ => otherExn e; exit 1 ) handle _ => sysExit 127 -- cgit v1.2.3