| 111 | } |
| 112 | |
| 113 | void print(std::ostream& stream, const Customer& customer) |
| 114 | { |
| 115 | stream << customer.toString() << std::endl; |
| 116 | if (std::cout.fail()) |
| 117 | { |
| 118 | std::cout.clear(); |
| 119 | throw std::runtime_error("Failed to output customer"); |
| 120 | } |
| 121 | } |