* Exception handler for the WQ. * * Closes the connection if connected. * * @param exp Exception pointer */
| 145 | * @param exp Exception pointer |
| 146 | */ |
| 147 | void GraphiteWriter::ExceptionHandler(boost::exception_ptr exp) |
| 148 | { |
| 149 | Log(LogCritical, "GraphiteWriter", "Exception during Graphite operation: Verify that your backend is operational!"); |
| 150 | |
| 151 | Log(LogDebug, "GraphiteWriter") |
| 152 | << "Exception during Graphite operation: " << DiagnosticInformation(std::move(exp)); |
| 153 | |
| 154 | if (GetConnected()) { |
| 155 | m_Stream->close(); |
| 156 | |
| 157 | SetConnected(false); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Reconnect method, stops when the feature is paused in HA zones. |