summaryrefslogtreecommitdiff
path: root/exn_handler.fun
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-05-14 17:16:25 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-05-14 17:16:25 +0200
commit1f31e550385cfa64a36167a5f3f9ec780baaad86 (patch)
tree4538d05b4c459210ce58a9251cf509bd12835472 /exn_handler.fun
parent3d568063a49204193009ad6a2637176b38902525 (diff)
Proper ppc.tkPos
Diffstat (limited to 'exn_handler.fun')
-rw-r--r--exn_handler.fun11
1 files changed, 7 insertions, 4 deletions
diff --git a/exn_handler.fun b/exn_handler.fun
index b95e847..078225f 100644
--- a/exn_handler.fun
+++ b/exn_handler.fun
@@ -8,7 +8,7 @@ struct
let
val hist = MLton.Exn.history e
in
- eprint $ "exception " ^ exnMessage e ^ " was raised";
+ eprint $ "exception " ^ exnMessage e ^ " was raised\n";
if hist = [] then
(output "No stack trace is avaliable\n";
output "Recompile with -const \"Exn.keepHistory true\"\n")
@@ -30,13 +30,16 @@ struct
end
| ioExn _ = (output "ioExn: unreachable\n"; exit 254)
- fun handler e =
- (case e of
+ fun handler e = (
+ printf `"\n" %;
+ case e of
T.FsmTableIsTooSmall =>
eprint "fsm table is too small. Increate 'maxState' value"
| IO.Io _ => ioExn e
| T.TkErrorAug (pos, msg) => eprint $ T.S.pos2str pos ^ ": " ^ msg
| P.TkError v => P.tkErrorPrint v
+ | P.TkClassError v => P.tkClassErrorPrint v
| _ => otherExn e;
- exit 255)
+ exit 255
+ )
end