equal
deleted
inserted
replaced
20 def was_timeout: Process_Result = copy(rc = 1, timeout = true) |
20 def was_timeout: Process_Result = copy(rc = 1, timeout = true) |
21 |
21 |
22 def ok: Boolean = rc == 0 |
22 def ok: Boolean = rc == 0 |
23 def interrupted: Boolean = rc == Exn.Interrupt.return_code |
23 def interrupted: Boolean = rc == Exn.Interrupt.return_code |
24 |
24 |
25 def check: Process_Result = |
25 def check_rc(pred: Int => Boolean): Process_Result = |
26 if (ok) this |
26 if (pred(rc)) this |
27 else if (interrupted) throw Exn.Interrupt() |
27 else if (interrupted) throw Exn.Interrupt() |
28 else Exn.error(err) |
28 else Exn.error(err) |
|
29 |
|
30 def check: Process_Result = check_rc(_ == 0) |
29 |
31 |
30 def print: Process_Result = |
32 def print: Process_Result = |
31 { |
33 { |
32 Output.warning(err) |
34 Output.warning(err) |
33 Output.writeln(out) |
35 Output.writeln(out) |