- | Ulexer.Loc.Exc_located ((x,y),e) ->
- Printf.eprintf "character %i-%i %s\n" x y (Printexc.to_string e);
- exit 1
-
- | e ->
- output_string stderr "\n";
- flush stderr;
- Printexc.print_backtrace stderr;
- Printf.eprintf "FATAL ERROR: %s\n%!" (Printexc.to_string e);
- output_string stderr "\n";
- flush stderr;
-(* Ptset.Int.stats(); *)
- exit 2
-
-
+ | Ulexer.Loc.Exc_located ((x,y),e) ->
+ Logger.print Format.err_formatter "character %i-%i %s@\n" x y (Printexc.to_string e);
+ exit 1
+
+ | e ->
+ Logger.print Format.err_formatter "BACKTRACE: %s@\n@?" (Printexc.get_backtrace());
+ Logger.print Format.err_formatter "FATAL ERROR: %s@\n@?" (Printexc.to_string e);
+ exit 2