Return a string representation of this status suitable for printing. Returns the string "OK" for success.
| 58 | // Return a string representation of this status suitable for printing. |
| 59 | // Returns the string "OK" for success. |
| 60 | string ToString() const { |
| 61 | if(state_ == NULL) { |
| 62 | return "OK"; |
| 63 | } else { |
| 64 | string err_code = "Error code: " + strfy(state_->first); |
| 65 | string err_msg = "Error msg: " + strfy(state_->second); |
| 66 | return err_code + "\t" + err_msg; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | private: |
| 71 | enum Code { |