home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / compiler / Printexc.sig < prev    next >
Encoding:
Text File  |  1997-08-18  |  600 b   |  13 lines  |  [TEXT/R*ch]

  1. (* A catch-all exception handler *)
  2.  
  3. val f: ('a -> 'b) -> 'a -> 'b;
  4.         (* [f fn x] applies [fn] to [x] and returns the result.
  5.            If the evaluation of [fn x] raises any exception, the
  6.            name of the exception is printed on standard error output,
  7.            and the programs aborts with exit code 2.
  8.            Typical use is [f main ()], where [main], with type
  9.            [unit->unit], is the entry point of a standalone program, to catch
  10.            and print stray exceptions.
  11.            For [f] to work properly, the program must be linked
  12.            with the [-g] option. *)
  13.