Summary: Previous implementation only printed the desired state, not the actual runtime state. Fix that.
Test Plan: n/a
Reviewed By: tudorb@fb.com
FB internal diff:
D936279
"Invalid ProcessReturnCode: ", rawStatus_));
}
-void ProcessReturnCode::enforce(State s) const {
- if (state() != s) {
- throw std::logic_error(to<std::string>("Invalid state ", s));
+void ProcessReturnCode::enforce(State expected) const {
+ State s = state();
+ if (s != expected) {
+ throw std::logic_error(to<std::string>("Invalid state ", s,
+ " expected ", expected));
}
}