TODO(bevers): Compare the SlaveInfo fields individually, in order to be able to generate better error messages.
| 33 | // TODO(bevers): Compare the SlaveInfo fields individually, in order to be |
| 34 | // able to generate better error messages. |
| 35 | Try<Nothing> equal( |
| 36 | const SlaveInfo& previous, |
| 37 | const SlaveInfo& current) |
| 38 | { |
| 39 | if (previous == current) { |
| 40 | return Nothing(); |
| 41 | } |
| 42 | |
| 43 | return Error(strings::join( |
| 44 | "\n", |
| 45 | "Incompatible agent info detected. ", |
| 46 | "\n------------------------------------------------------------", |
| 47 | "Old agent info:\n" + stringify(previous), |
| 48 | "\n------------------------------------------------------------", |
| 49 | "New agent info:\n" + stringify(current), |
| 50 | "\n------------------------------------------------------------")); |
| 51 | } |
| 52 | |
| 53 | |
| 54 | Try<Nothing> additive( |