Correct thrown exception type in process::wait().