equal
deleted
inserted
replaced
10 end; |
10 end; |
11 |
11 |
12 structure Command_Line: COMMAND_LINE = |
12 structure Command_Line: COMMAND_LINE = |
13 struct |
13 struct |
14 |
14 |
15 fun tool body = |
15 fun tool main = |
16 Thread_Attributes.uninterruptible_body (fn run => |
16 Thread_Attributes.uninterruptible_body (fn run => |
17 let |
17 let |
18 fun print_failure exn = (Runtime.exn_error_message exn; Exn.failure_rc exn); |
18 fun print_failure exn = (Runtime.exn_error_message exn; Exn.failure_rc exn); |
19 val rc = |
19 val rc = |
20 (case Exn.capture (run body) () of |
20 (case Exn.capture_body (run main) of |
21 Exn.Res () => 0 |
21 Exn.Res () => 0 |
22 | Exn.Exn exn => |
22 | Exn.Exn exn => |
23 (case Exn.capture print_failure exn of |
23 (case Exn.capture print_failure exn of |
24 Exn.Res rc => rc |
24 Exn.Res rc => rc |
25 | Exn.Exn crash => Exn.failure_rc crash)); |
25 | Exn.Exn crash => Exn.failure_rc crash)); |