summaryrefslogtreecommitdiff
path: root/exn_handler.fun
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-05-19 21:17:49 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-05-19 21:17:49 +0200
commitb2d8dcd8673cfcdbf1e8a02aa19c53e42b8a60b6 (patch)
tree7de178aec8ebeacc7b4effe3b09de4485487da65 /exn_handler.fun
parent88378509521b46e615986f8c82d10b9da88830d2 (diff)
Transition from exception-based errors to printf-based
Diffstat (limited to 'exn_handler.fun')
-rw-r--r--exn_handler.fun11
1 files changed, 2 insertions, 9 deletions
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