ProcessResult.ensureStatus

Ensure that program exited with expected exit code.

  1. auto ref ensureStatus(string msg, bool add_output, int expected)
    struct ProcessResult
    ref const
    ensureStatus
    (
    E : Throwable = ProcessException
    )
    (
    in string msg
    ,
    in bool add_output
    ,
    in int expected = 0
    )
  2. auto ref ensureStatus(string msg, int expected)
  3. auto ref ensureStatus(int expected)

Parameters

msg string

message to throw in exception in case of check failure

add_output bool

if set to True, then output of command will be attached to message on failure.

expected int

expected exit-code, if differ, then exception will be thrown.

Meta