| 227 | } |
| 228 | |
| 229 | void RuntimeState::GetUnreportedErrors(ErrorLogMapPB* new_errors) { |
| 230 | new_errors->clear(); |
| 231 | lock_guard<SpinLock> l(error_log_lock_); |
| 232 | for (const ErrorLogMap::value_type& v : error_log_) { |
| 233 | (*new_errors)[v.first] = v.second; |
| 234 | } |
| 235 | // Reset all messages, but keep all already reported keys so that we do not report the |
| 236 | // same errors multiple times. |
| 237 | ClearErrorMap(error_log_); |
| 238 | } |
| 239 | |
| 240 | Status RuntimeState::LogOrReturnError(const ErrorMsg& message) { |
| 241 | DCHECK_NE(message.error(), TErrorCode::OK); |
no test coverage detected