| 61 | } |
| 62 | |
| 63 | void PythonScriptManagerState::setScriptError(size_t index, const std::string& error) { |
| 64 | std::uint64_t generation = 0; |
| 65 | { |
| 66 | std::lock_guard lock(mutex_); |
| 67 | if (index < scripts_.size()) { |
| 68 | const bool has_error = !error.empty(); |
| 69 | if (scripts_[index].has_error != has_error || scripts_[index].error_message != error) { |
| 70 | scripts_[index].has_error = has_error; |
| 71 | scripts_[index].error_message = error; |
| 72 | generation = ++generation_; |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | publishScriptsGeneration(generation); |
| 77 | } |
| 78 | |
| 79 | void PythonScriptManagerState::clearErrors() { |
| 80 | std::uint64_t generation = 0; |
no test coverage detected